Files
animethemes-server/app/Console/Commands/Storage/Admin/DumpPruneCommand.php
T
paranarimasuandGitHub 1d93000c6f feat(admin): migrate db dumps from github to platform (#463)
* feat(admin): migrate db dumps from github to platform

* style: fix StyleCI findings
2022-09-18 22:31:29 -05:00

35 lines
739 B
PHP

<?php
declare(strict_types=1);
namespace App\Console\Commands\Storage\Admin;
use App\Actions\Storage\Admin\Dump\PruneDumpAction;
use App\Actions\Storage\Base\PruneAction;
use App\Console\Commands\Storage\Base\PruneCommand;
/**
* Class DumpPruneCommand.
*/
class DumpPruneCommand extends PruneCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'prune:dump {--H|hours=72 : The number of hours to retain dumps}';
/**
* Get the underlying action.
*
* @return PruneAction
*/
protected function getAction(): PruneAction
{
$hours = $this->option('hours');
return new PruneDumpAction(intval($hours));
}
}