Passed
Push — master ( 3f1f2e...c46818 )
by
unknown
08:52
created
src/DbDumperFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     protected static function processExtraDumpParameters(array $dumpConfiguration, $dbDumper): DbDumper
79 79
     {
80
-        collect($dumpConfiguration)->each(function ($configValue, $configName) use ($dbDumper) {
80
+        collect($dumpConfiguration)->each(function($configValue, $configName) use ($dbDumper) {
81 81
             $methodName = lcfirst(Str::studly(is_numeric($configName) ? $configValue : $configName));
82 82
             $methodValue = is_numeric($configName) ? null : $configValue;
83 83
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     protected static function callMethodOnDumper(DbDumper $dbDumper, string $methodName, $methodValue = null): DbDumper
102 102
     {
103
-        if (! $methodValue) {
103
+        if (!$methodValue) {
104 104
             $dbDumper->$methodName();
105 105
 
106 106
             return $dbDumper;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     protected static function determineValidMethodName(DbDumper $dbDumper, string $methodName): string
115 115
     {
116 116
         return collect([$methodName, 'set'.ucfirst($methodName)])
117
-            ->first(function (string $methodName) use ($dbDumper) {
117
+            ->first(function(string $methodName) use ($dbDumper) {
118 118
                 return method_exists($dbDumper, $methodName);
119 119
             }, '');
120 120
     }
Please login to merge, or discard this patch.
src/Commands/Cleanup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 
18 18
         $keep = $this->option('keep');
19 19
 
20
-        if (! $keep && $keep !== '0') {
20
+        if (!$keep && $keep !== '0') {
21 21
             $this->warn('No value for option --keep.');
22 22
 
23 23
             return;
24 24
         }
25 25
 
26
-        $snapshots->splice($keep)->each(function ($snapshot) {
26
+        $snapshots->splice($keep)->each(function($snapshot) {
27 27
             $snapshot->delete();
28 28
         });
29 29
     }
Please login to merge, or discard this patch.
src/Commands/ListSnapshots.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             return;
24 24
         }
25 25
 
26
-        $rows = $snapshots->map(function (Snapshot $snapshot) {
26
+        $rows = $snapshots->map(function(Snapshot $snapshot) {
27 27
             return [
28 28
                 $snapshot->name,
29 29
                 $snapshot->createdAt()->format('Y-m-d H:i:s'),
Please login to merge, or discard this patch.
src/Commands/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
         $snapshot = app(SnapshotRepository::class)->findByName($name);
30 30
 
31
-        if (! $snapshot) {
31
+        if (!$snapshot) {
32 32
             $this->warn("Snapshot `{$name}` does not exist!");
33 33
 
34 34
             return;
Please login to merge, or discard this patch.
src/Commands/Load.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
             return;
27 27
         }
28 28
 
29
-        if (! $this->confirmToProceed()) {
29
+        if (!$this->confirmToProceed()) {
30 30
             return;
31 31
         }
32 32
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $snapshot = app(SnapshotRepository::class)->findByName($name);
40 40
 
41
-        if (! $snapshot) {
41
+        if (!$snapshot) {
42 42
             $this->warn("Snapshot `{$name}` does not exist!");
43 43
 
44 44
             return;
Please login to merge, or discard this patch.
src/Commands/Concerns/AsksForSnapshotName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         $snapShots = app(SnapshotRepository::class)->getAll();
13 13
 
14
-        $names = $snapShots->map(function (Snapshot $snapshot) {
14
+        $names = $snapShots->map(function(Snapshot $snapshot) {
15 15
             return $snapshot->name;
16 16
         })->values()->toArray();
17 17
 
Please login to merge, or discard this patch.
src/Exceptions/CannotCreateDisk.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     {
11 11
         $disks = config('filesystems.disks', null);
12 12
 
13
-        if (! $disks) {
13
+        if (!$disks) {
14 14
             return new static("Cannot create a disk `{$diskName}`. There are no disks set up.");
15 15
         }
16 16
 
Please login to merge, or discard this patch.
src/DbSnapshotsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             ], 'config');
21 21
         }
22 22
 
23
-        $this->app->bind(SnapshotRepository::class, function () {
23
+        $this->app->bind(SnapshotRepository::class, function() {
24 24
             $diskName = config('db-snapshots.disk');
25 25
 
26 26
             $disk = app(Factory::class)->disk($diskName);
Please login to merge, or discard this patch.
src/SnapshotRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public function getAll(): Collection
18 18
     {
19 19
         return collect($this->disk->allFiles())
20
-            ->filter(function (string $fileName) {
20
+            ->filter(function(string $fileName) {
21 21
                 $pathinfo = pathinfo($fileName);
22 22
 
23 23
                 if ($pathinfo['extension'] === 'gz') {
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
 
27 27
                 return pathinfo($fileName, PATHINFO_EXTENSION) === 'sql';
28 28
             })
29
-            ->map(function (string $fileName) {
29
+            ->map(function(string $fileName) {
30 30
                 return new Snapshot($this->disk, $fileName);
31 31
             })
32
-            ->sortByDesc(function (Snapshot $snapshot) {
32
+            ->sortByDesc(function(Snapshot $snapshot) {
33 33
                 return $snapshot->createdAt()->toDateTimeString();
34 34
             });
35 35
     }
36 36
 
37 37
     public function findByName(string $name)
38 38
     {
39
-        return $this->getAll()->first(function (Snapshot $snapshot) use ($name) {
39
+        return $this->getAll()->first(function(Snapshot $snapshot) use ($name) {
40 40
             return $snapshot->name === $name;
41 41
         });
42 42
     }
Please login to merge, or discard this patch.