mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Use more standardized phpcs
This commit is contained in:
@@ -9,7 +9,7 @@ use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
|
||||
|
||||
class CleanServiceBackupFilesCommand extends Command
|
||||
{
|
||||
const BACKUP_THRESHOLD_MINUTES = 5;
|
||||
public const BACKUP_THRESHOLD_MINUTES = 5;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -28,8 +28,6 @@ class CleanServiceBackupFilesCommand extends Command
|
||||
|
||||
/**
|
||||
* CleanServiceBackupFilesCommand constructor.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Filesystem\Factory $filesystem
|
||||
*/
|
||||
public function __construct(FilesystemFactory $filesystem)
|
||||
{
|
||||
|
||||
@@ -19,13 +19,10 @@ class PruneOrphanedBackupsCommand extends Command
|
||||
*/
|
||||
protected $description = 'Marks all backups that have not completed in the last "n" minutes as being failed.';
|
||||
|
||||
/**
|
||||
* @param \Pterodactyl\Repositories\Eloquent\BackupRepository $repository
|
||||
*/
|
||||
public function handle(BackupRepository $repository)
|
||||
{
|
||||
$since = $this->option('since-minutes');
|
||||
if (! is_digit($since)) {
|
||||
if (!is_digit($since)) {
|
||||
throw new InvalidArgumentException('The --since-minutes option must be a valid numeric digit.');
|
||||
}
|
||||
|
||||
@@ -34,7 +31,7 @@ class PruneOrphanedBackupsCommand extends Command
|
||||
->whereDate('created_at', '<=', CarbonImmutable::now()->subMinutes($since));
|
||||
|
||||
$count = $query->count();
|
||||
if (! $count) {
|
||||
if (!$count) {
|
||||
$this->info('There are no orphaned backups to be marked as failed.');
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user