Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Aug 9, 2023
1 parent 70179c3 commit 800f344
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/Commands/BackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Spatie\Backup\Commands;

use Exception;
use Spatie\Backup\Traits\Retryable;
use Spatie\Backup\Events\BackupHasFailed;
use Spatie\Backup\Exceptions\InvalidCommand;
use Spatie\Backup\Tasks\Backup\BackupJobFactory;
use Spatie\Backup\Traits\Retryable;

class BackupCommand extends BaseCommand
{
Expand Down Expand Up @@ -70,6 +70,7 @@ public function handle()
}

$this->currentTry += 1;

return $this->handle();
}

Expand Down
5 changes: 3 additions & 2 deletions src/Commands/CleanupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace Spatie\Backup\Commands;

use Exception;
use Spatie\Backup\Traits\Retryable;
use Spatie\Backup\BackupDestination\BackupDestinationFactory;
use Spatie\Backup\Events\CleanupHasFailed;
use Spatie\Backup\Tasks\Cleanup\CleanupJob;
use Spatie\Backup\Tasks\Cleanup\CleanupStrategy;
use Spatie\Backup\BackupDestination\BackupDestinationFactory;
use Spatie\Backup\Traits\Retryable;

class CleanupCommand extends BaseCommand
{
Expand Down Expand Up @@ -53,6 +53,7 @@ public function handle()
}

$this->currentTry += 1;

return $this->handle();
}

Expand Down
3 changes: 2 additions & 1 deletion src/Traits/Retryable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function shouldRetry()

protected function hasRetryDelay(string $type)
{
return !empty($this->getRetryDelay($type));
return ! empty($this->getRetryDelay($type));
}

protected function sleepFor(int $seconds = 0)
Expand All @@ -33,6 +33,7 @@ protected function setTries(string $type)
{
if ($this->option('tries')) {
$this->tries = (int)$this->option('tries');

return;
}

Expand Down
5 changes: 2 additions & 3 deletions tests/Commands/BackupCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php

use Carbon\Carbon;
use Illuminate\Support\Sleep;
use Illuminate\Support\Facades\Event;
use Carbon\CarbonInterval as Duration;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Sleep;
use Spatie\Backup\Events\BackupHasFailed;
use Spatie\Backup\Events\BackupZipWasCreated;
use Spatie\DbDumper\Compressors\GzipCompressor;
Expand Down
4 changes: 2 additions & 2 deletions tests/Commands/CleanupCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

use Illuminate\Support\Sleep;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Sleep;
use Spatie\Backup\Events\CleanupWasSuccessful;

beforeEach(function () {
Expand Down

0 comments on commit 800f344

Please sign in to comment.