@@ -23,7 +23,7 @@ |
||
| 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'), |
@@ -11,7 +11,7 @@ |
||
| 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 | |
@@ -20,7 +20,7 @@ |
||
| 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); |
@@ -17,7 +17,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | protected static function processExtraDumpParameters(array $dumpConfiguration, $dbDumper): DbDumper |
| 78 | 78 | { |
| 79 | - collect($dumpConfiguration)->each(function ($configValue, $configName) use ($dbDumper) { |
|
| 79 | + collect($dumpConfiguration)->each(function($configValue, $configName) use ($dbDumper) { |
|
| 80 | 80 | $methodName = lcfirst(Str::studly(is_numeric($configName) ? $configValue : $configName)); |
| 81 | 81 | $methodValue = is_numeric($configName) ? null : $configValue; |
| 82 | 82 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | protected static function determineValidMethodName(DbDumper $dbDumper, string $methodName): string |
| 114 | 114 | { |
| 115 | 115 | return collect([$methodName, 'set'.ucfirst($methodName)]) |
| 116 | - ->first(function (string $methodName) use ($dbDumper) { |
|
| 116 | + ->first(function(string $methodName) use ($dbDumper) { |
|
| 117 | 117 | return method_exists($dbDumper, $methodName); |
| 118 | 118 | }, ''); |
| 119 | 119 | } |
@@ -23,7 +23,7 @@ |
||
| 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 | } |