Permalink
Browse files

Apply fixes from StyleCI (#326)

  • Loading branch information...
1 parent b9c68dc commit 418c62e5489d110f0c6ce91555ca0f3d8dc2bfe6 @freekmurze freekmurze committed on GitHub Dec 11, 2016
Showing with 58 additions and 62 deletions.
  1. +0 −2 config/laravel-backup.php
  2. +1 −1 src/BackupDestination/BackupDestination.php
  3. +2 −2 src/BackupServiceProvider.php
  4. +1 −1 src/Commands/BackupCommand.php
  5. +1 −1 src/Commands/CleanupCommand.php
  6. +1 −1 src/Commands/ListCommand.php
  7. +1 −1 src/Events/BackupHasFailed.php
  8. +1 −1 src/Events/CleanupHasFailed.php
  9. +2 −2 src/Notifications/BaseNotification.php
  10. +3 −3 src/Notifications/EventHandler.php
  11. +2 −3 src/Notifications/Notifications/BackupHasFailed.php
  12. +2 −2 src/Notifications/Notifications/BackupWasSuccessful.php
  13. +2 −2 src/Notifications/Notifications/CleanupHasFailed.php
  14. +2 −2 src/Notifications/Notifications/CleanupWasSuccessful.php
  15. +2 −2 src/Notifications/Notifications/HealthyBackupWasFound.php
  16. +2 −3 src/Notifications/Notifications/UnhealthyBackupWasFound.php
  17. +4 −4 src/Tasks/Backup/BackupJob.php
  18. +2 −2 src/Tasks/Backup/DbDumperFactory.php
  19. +1 −1 src/Tasks/Backup/Zip.php
  20. +2 −2 src/Tasks/Cleanup/CleanupJob.php
  21. +2 −2 src/Tasks/Cleanup/Strategies/DefaultStrategy.php
  22. +2 −2 src/Tasks/Monitor/BackupDestinationStatus.php
  23. +2 −2 tests/Integration/BackupDestination/BackupCollectionTest.php
  24. +1 −1 tests/Integration/BackupDestination/BackupTest.php
  25. +1 −1 tests/Integration/Events/BackupManifestWasCreatedTest.php
  26. +1 −1 tests/Integration/Events/BackupWasSuccessfulTest.php
  27. +1 −1 tests/Integration/Events/BackupZipWasCreatedTest.php
  28. +1 −1 tests/Integration/Events/CleanupWasSuccessfulTest.php
  29. +2 −2 tests/Integration/Notifications/EventHandlerTest.php
  30. +2 −2 tests/Integration/Notifications/NotifiableTest.php
  31. +3 −3 tests/Integration/TestCase.php
  32. +3 −3 tests/Unit/DbDumperFactoryTest.php
  33. +1 −1 tests/Unit/FileSelectionTest.php
  34. +1 −1 tests/Unit/ManifestTest.php
  35. +1 −1 tests/Unit/ZipTest.php
@@ -62,7 +62,6 @@
],
],
-
/*
* You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'.
* For Slack you need to install guzzlehttp/guzzle.
@@ -119,7 +118,6 @@
*/
],
-
'cleanup' => [
/*
* The strategy that will be used to cleanup old backups. The default strategy
@@ -2,10 +2,10 @@
namespace Spatie\Backup\BackupDestination;
+use Exception;
use Carbon\Carbon;
use Illuminate\Contracts\Filesystem\Factory;
use Illuminate\Contracts\Filesystem\Filesystem;
-use Exception;
use Spatie\Backup\Exceptions\InvalidBackupDestination;
class BackupDestination
@@ -3,11 +3,11 @@
namespace Spatie\Backup;
use Illuminate\Support\ServiceProvider;
+use Spatie\Backup\Commands\ListCommand;
+use Spatie\Backup\Helpers\ConsoleOutput;
use Spatie\Backup\Commands\BackupCommand;
use Spatie\Backup\Commands\CleanupCommand;
-use Spatie\Backup\Commands\ListCommand;
use Spatie\Backup\Commands\MonitorCommand;
-use Spatie\Backup\Helpers\ConsoleOutput;
use Spatie\Backup\Notifications\EventHandler;
class BackupServiceProvider extends ServiceProvider
@@ -2,10 +2,10 @@
namespace Spatie\Backup\Commands;
+use Exception;
use Spatie\Backup\Events\BackupHasFailed;
use Spatie\Backup\Exceptions\InvalidCommand;
use Spatie\Backup\Tasks\Backup\BackupJobFactory;
-use Exception;
class BackupCommand extends BaseCommand
{
@@ -3,9 +3,9 @@
namespace Spatie\Backup\Commands;
use Exception;
-use Spatie\Backup\BackupDestination\BackupDestinationFactory;
use Spatie\Backup\Events\CleanupHasFailed;
use Spatie\Backup\Tasks\Cleanup\CleanupJob;
+use Spatie\Backup\BackupDestination\BackupDestinationFactory;
class CleanupCommand extends BaseCommand
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Commands;
-use Illuminate\Support\Collection;
use Spatie\Backup\Helpers\Format;
+use Illuminate\Support\Collection;
use Spatie\Backup\Tasks\Monitor\BackupDestinationStatus;
use Spatie\Backup\Tasks\Monitor\BackupDestinationStatusFactory;
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Events;
-use Spatie\Backup\BackupDestination\BackupDestination;
use Exception;
+use Spatie\Backup\BackupDestination\BackupDestination;
class BackupHasFailed
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Events;
-use Spatie\Backup\BackupDestination\BackupDestination;
use Exception;
+use Spatie\Backup\BackupDestination\BackupDestination;
class CleanupHasFailed
{
@@ -2,9 +2,9 @@
namespace Spatie\Backup\Notifications;
-use Illuminate\Notifications\Notification;
-use Illuminate\Support\Collection;
use Spatie\Backup\Helpers\Format;
+use Illuminate\Support\Collection;
+use Illuminate\Notifications\Notification;
abstract class BaseNotification extends Notification
{
@@ -3,11 +3,11 @@
namespace Spatie\Backup\Notifications;
use Illuminate\Config\Repository;
-use Illuminate\Contracts\Events\Dispatcher;
-use Illuminate\Notifications\Notification;
use Spatie\Backup\Events\BackupHasFailed;
-use Spatie\Backup\Events\BackupWasSuccessful;
+use Illuminate\Notifications\Notification;
use Spatie\Backup\Events\CleanupHasFailed;
+use Illuminate\Contracts\Events\Dispatcher;
+use Spatie\Backup\Events\BackupWasSuccessful;
use Spatie\Backup\Events\CleanupWasSuccessful;
use Spatie\Backup\Events\HealthyBackupWasFound;
use Spatie\Backup\Events\UnhealthyBackupWasFound;
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Notifications\Notifications;
+use Spatie\Backup\Notifications\BaseNotification;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackAttachment;
use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Messages\SlackAttachment;
use Spatie\Backup\Events\BackupHasFailed as BackupHasFailedEvent;
-use Spatie\Backup\Notifications\BaseNotification;
class BackupHasFailed extends BaseNotification
{
@@ -22,7 +22,6 @@ public function toMail(): MailMessage
->line("Exception message: `{$this->event->exception->getMessage()}`")
->line("Exception trace: `{$this->event->exception->getTraceAsString()}`");
-
$this->backupDestinationProperties()->each(function ($value, $name) use ($mailMessage) {
$mailMessage->line("{$name}: $value");
});
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Notifications\Notifications;
+use Spatie\Backup\Notifications\BaseNotification;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackAttachment;
use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Messages\SlackAttachment;
use Spatie\Backup\Events\BackupWasSuccessful as BackupWasSuccessfulEvent;
-use Spatie\Backup\Notifications\BaseNotification;
class BackupWasSuccessful extends BaseNotification
{
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Notifications\Notifications;
+use Spatie\Backup\Notifications\BaseNotification;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackAttachment;
use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Messages\SlackAttachment;
use Spatie\Backup\Events\CleanupHasFailed as CleanupHasFailedEvent;
-use Spatie\Backup\Notifications\BaseNotification;
class CleanupHasFailed extends BaseNotification
{
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Notifications\Notifications;
+use Spatie\Backup\Notifications\BaseNotification;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackAttachment;
use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Messages\SlackAttachment;
use Spatie\Backup\Events\CleanupWasSuccessful as CleanupWasSuccessfulEvent;
-use Spatie\Backup\Notifications\BaseNotification;
class CleanupWasSuccessful extends BaseNotification
{
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Notifications\Notifications;
+use Spatie\Backup\Notifications\BaseNotification;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackAttachment;
use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Messages\SlackAttachment;
use Spatie\Backup\Events\HealthyBackupWasFound as HealthyBackupWasFoundEvent;
-use Spatie\Backup\Notifications\BaseNotification;
class HealthyBackupWasFound extends BaseNotification
{
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Notifications\Notifications;
+use Spatie\Backup\Notifications\BaseNotification;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Messages\SlackAttachment;
use Illuminate\Notifications\Messages\SlackMessage;
+use Illuminate\Notifications\Messages\SlackAttachment;
use Spatie\Backup\Events\UnhealthyBackupWasFound as UnhealthyBackupWasFoundEvent;
-use Spatie\Backup\Notifications\BaseNotification;
class UnhealthyBackupWasFound extends BaseNotification
{
@@ -21,7 +21,6 @@ public function toMail(): MailMessage
->line("The backups for `{$this->applicationName()}` on disk `{$this->diskName()}` are unhealthy.")
->line($this->problemDescription());
-
$this->backupDestinationProperties()->each(function ($value, $name) use ($mailMessage) {
$mailMessage->line("{$name}: $value");
});
@@ -2,16 +2,16 @@
namespace Spatie\Backup\Tasks\Backup;
+use Exception;
use Carbon\Carbon;
+use Spatie\DbDumper\DbDumper;
use Illuminate\Support\Collection;
-use Spatie\Backup\BackupDestination\BackupDestination;
use Spatie\Backup\Events\BackupHasFailed;
-use Spatie\Backup\Events\BackupManifestWasCreated;
use Spatie\Backup\Events\BackupWasSuccessful;
use Spatie\Backup\Events\BackupZipWasCreated;
use Spatie\Backup\Exceptions\InvalidBackupJob;
-use Exception;
-use Spatie\DbDumper\DbDumper;
+use Spatie\Backup\Events\BackupManifestWasCreated;
+use Spatie\Backup\BackupDestination\BackupDestination;
class BackupJob
{
@@ -2,10 +2,10 @@
namespace Spatie\Backup\Tasks\Backup;
-use Spatie\Backup\Exceptions\CannotCreateDbDumper;
+use Spatie\DbDumper\DbDumper;
use Spatie\DbDumper\Databases\MySql;
use Spatie\DbDumper\Databases\PostgreSql;
-use Spatie\DbDumper\DbDumper;
+use Spatie\Backup\Exceptions\CannotCreateDbDumper;
class DbDumperFactory
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Tasks\Backup;
-use Spatie\Backup\Helpers\Format;
use ZipArchive;
+use Spatie\Backup\Helpers\Format;
class Zip
{
@@ -3,11 +3,11 @@
namespace Spatie\Backup\Tasks\Cleanup;
use Exception;
+use Spatie\Backup\Helpers\Format;
use Illuminate\Support\Collection;
-use Spatie\Backup\BackupDestination\BackupDestination;
use Spatie\Backup\Events\CleanupHasFailed;
use Spatie\Backup\Events\CleanupWasSuccessful;
-use Spatie\Backup\Helpers\Format;
+use Spatie\Backup\BackupDestination\BackupDestination;
class CleanupJob
{
@@ -4,10 +4,10 @@
use Carbon\Carbon;
use Illuminate\Support\Collection;
+use Spatie\Backup\Tasks\Cleanup\Period;
use Spatie\Backup\BackupDestination\Backup;
-use Spatie\Backup\BackupDestination\BackupCollection;
use Spatie\Backup\Tasks\Cleanup\CleanupStrategy;
-use Spatie\Backup\Tasks\Cleanup\Period;
+use Spatie\Backup\BackupDestination\BackupCollection;
class DefaultStrategy extends CleanupStrategy
{
@@ -2,10 +2,10 @@
namespace Spatie\Backup\Tasks\Monitor;
-use Carbon\Carbon;
use Exception;
-use Spatie\Backup\BackupDestination\BackupDestination;
+use Carbon\Carbon;
use Spatie\Backup\Helpers\Format;
+use Spatie\Backup\BackupDestination\BackupDestination;
class BackupDestinationStatus
{
@@ -2,11 +2,11 @@
namespace Spatie\Backup\Test\Integration\BackupCollectionTest;
+use Storage;
use Carbon\Carbon;
use Spatie\Backup\BackupDestination\Backup;
-use Spatie\Backup\BackupDestination\BackupCollection;
use Spatie\Backup\Test\Integration\TestCase;
-use Storage;
+use Spatie\Backup\BackupDestination\BackupCollection;
class BackupCollectionTest extends TestCase
{
@@ -2,10 +2,10 @@
namespace Spatie\Backup\Test\Integration\BackupCollectionTest;
+use Storage;
use Carbon\Carbon;
use Spatie\Backup\BackupDestination\Backup;
use Spatie\Backup\Test\Integration\TestCase;
-use Storage;
class BackupTest extends TestCase
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Test\Integration\Events;
-use Spatie\Backup\Events\BackupManifestWasCreated;
use Spatie\Backup\Test\Integration\TestCase;
+use Spatie\Backup\Events\BackupManifestWasCreated;
class BackupManifestWasCreatedTest extends TestCase
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Test\Integration\Events;
-use Spatie\Backup\Events\BackupWasSuccessful;
use Spatie\Backup\Test\Integration\TestCase;
+use Spatie\Backup\Events\BackupWasSuccessful;
class BackupWasSuccessfulTest extends TestCase
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Test\Integration\Events;
-use Spatie\Backup\Events\BackupZipWasCreated;
use Spatie\Backup\Test\Integration\TestCase;
+use Spatie\Backup\Events\BackupZipWasCreated;
class BackupZipWasCreatedTest extends TestCase
{
@@ -2,8 +2,8 @@
namespace Spatie\Backup\Test\Integration\Events;
-use Spatie\Backup\Events\CleanupWasSuccessful;
use Spatie\Backup\Test\Integration\TestCase;
+use Spatie\Backup\Events\CleanupWasSuccessful;
class CleanupWasSuccessfulTest extends TestCase
{
@@ -4,11 +4,11 @@
use Exception;
use Notification;
-use Spatie\Backup\BackupDestination\BackupDestinationFactory;
use Spatie\Backup\Events\BackupHasFailed;
use Spatie\Backup\Notifications\Notifiable;
-use Spatie\Backup\Notifications\Notifications\BackupHasFailed as BackupHasFailedNotification;
use Spatie\Backup\Test\Integration\TestCase;
+use Spatie\Backup\BackupDestination\BackupDestinationFactory;
+use Spatie\Backup\Notifications\Notifications\BackupHasFailed as BackupHasFailedNotification;
class EventHandlerTest extends TestCase
{
Oops, something went wrong.

0 comments on commit 418c62e

Please sign in to comment.