jonnybarnes.uk/app/Console/Commands/ReDownloadWebMentions.php
Jonny Barnes 39a197ae7b
refactor: Refactor file headers and add Psalm suppressions
- Added Psalm suppression annotations to multiple controller classes
- Added PHPDoc comment blocks to seeders and factories
- Added comments to indicate unused classes and methods
- Removed unused annotations and imports
2023-07-28 11:48:07 +01:00

41 lines
897 B
PHP

<?php
declare(strict_types=1);
namespace App\Console\Commands;
use App\Jobs\DownloadWebMention;
use App\Models\WebMention;
use Illuminate\Console\Command;
/**
* @psalm-suppress UnusedClass
*/
class ReDownloadWebMentions extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'webmentions:redownload';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Redownload the HTML content of webmentions';
/**
* Execute the console command.
*/
public function handle(): void
{
$webmentions = WebMention::all();
foreach ($webmentions as $webmention) {
$this->info('Initiation re-download of ' . $webmention->source);
dispatch(new DownloadWebMention($webmention->source));
}
}
}