Test Failed
Push — livewire ( 728bce...2b359b )
by Pavel
07:11 queued 03:27
created
src/LaravelBackupPanelApplicationServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $this->gate();
28 28
 
29
-        LaravelBackupPanel::auth(function ($request) {
29
+        LaravelBackupPanel::auth(function($request) {
30 30
             return app()->environment('local') ||
31 31
                    Gate::check('viewLaravelBackupPanel', [$request->user()]);
32 32
         });
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     protected function gate()
43 43
     {
44
-        Gate::define('viewLaravelBackupPanel', function ($user) {
44
+        Gate::define('viewLaravelBackupPanel', function($user) {
45 45
             return in_array($user->email, [
46 46
                 // '[email protected]'
47 47
             ]);
Please login to merge, or discard this patch.
src/LaravelBackupPanel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public static function check($request)
24 24
     {
25
-        return (static::$authUsing ?: function () {
25
+        return (static::$authUsing ?: function() {
26 26
             return app()->environment('local');
27 27
         })($request);
28 28
     }
Please login to merge, or discard this patch.
src/Jobs/CreateBackupJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             $backupJob->dontBackupDatabases();
32 32
         }
33 33
 
34
-        if (! empty($this->option)) {
34
+        if (!empty($this->option)) {
35 35
             $prefix = str_replace('_', '-', $this->option).'-';
36 36
 
37 37
             $backupJob->setFilename($prefix.date('Y-m-d-H-i-s').'.zip');
Please login to merge, or discard this patch.
src/Http/Livewire/App.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function updateBackupStatuses()
33 33
     {
34
-        $this->backupStatuses = Cache::remember('backup-statuses', now()->addSeconds(4), function () {
34
+        $this->backupStatuses = Cache::remember('backup-statuses', now()->addSeconds(4), function() {
35 35
             return BackupDestinationStatusFactory::createForMonitorConfig(config('backup.monitor_backups'))
36
-                ->map(function (BackupDestinationStatus $backupDestinationStatus) {
36
+                ->map(function(BackupDestinationStatus $backupDestinationStatus) {
37 37
                     return [
38 38
                         'name' => $backupDestinationStatus->backupDestination()->backupName(),
39 39
                         'disk' => $backupDestinationStatus->backupDestination()->diskName(),
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 ->toArray();
51 51
         });
52 52
 
53
-        if (! $this->activeDisk and count($this->backupStatuses)) {
53
+        if (!$this->activeDisk and count($this->backupStatuses)) {
54 54
             $this->activeDisk = $this->backupStatuses[0]['disk'];
55 55
         }
56 56
 
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 
72 72
         $backupDestination = BackupDestination::create($this->activeDisk, config('backup.backup.name'));
73 73
 
74
-        $this->files = Cache::remember("backups-{$this->activeDisk}", now()->addSeconds(4), function () use ($backupDestination) {
74
+        $this->files = Cache::remember("backups-{$this->activeDisk}", now()->addSeconds(4), function() use ($backupDestination) {
75 75
             return $backupDestination
76 76
                 ->backups()
77
-                ->map(function (Backup $backup) {
77
+                ->map(function(Backup $backup) {
78 78
                     return [
79 79
                         'path' => $backup->path(),
80 80
                         'date' => $backup->date()->format('Y-m-d H:i:s'),
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 
107 107
         $backupDestination
108 108
             ->backups()
109
-            ->first(function (Backup $backup) use ($deletingFile) {
109
+            ->first(function(Backup $backup) use ($deletingFile) {
110 110
                 return $backup->path() === $deletingFile['path'];
111 111
             })
112 112
             ->delete();
113 113
 
114 114
         $this->files = collect($this->files)
115
-            ->reject(function ($file) use ($deletingFile) {
115
+            ->reject(function($file) use ($deletingFile) {
116 116
                 return $file['path'] === $deletingFile['path']
117 117
                     && $file['date'] === $deletingFile['date']
118 118
                     && $file['size'] === $deletingFile['size'];
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
 
129 129
         $backupDestination = BackupDestination::create($this->activeDisk, config('backup.backup.name'));
130 130
 
131
-        $backup = $backupDestination->backups()->first(function (Backup $backup) use ($filePath) {
131
+        $backup = $backupDestination->backups()->first(function(Backup $backup) use ($filePath) {
132 132
             return $backup->path() === $filePath;
133 133
         });
134 134
 
135
-        if (! $backup) {
135
+        if (!$backup) {
136 136
             return response('Backup not found', Response::HTTP_UNPROCESSABLE_ENTITY);
137 137
         }
138 138
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             'Pragma' => 'public',
152 152
         ];
153 153
 
154
-        return response()->stream(function () use ($backup) {
154
+        return response()->stream(function() use ($backup) {
155 155
             $stream = $backup->stream();
156 156
 
157 157
             fpassthru($stream);
Please login to merge, or discard this patch.
src/LaravelBackupPanelServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         Route::group([
39 39
             'prefix' => config('laravel_backup_panel.path'),
40 40
             'middleware' => ['web', Authenticate::class],
41
-        ], function () {
41
+        ], function() {
42 42
             $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
43 43
         });
44 44
 
Please login to merge, or discard this patch.