@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | $this->publishes( |
| 23 | 23 | [ |
| 24 | - realpath(__DIR__ . '/config/garbageman.php') => config_path('garbageman.php'), |
|
| 24 | + realpath(__DIR__.'/config/garbageman.php') => config_path('garbageman.php'), |
|
| 25 | 25 | ], |
| 26 | 26 | 'config' |
| 27 | 27 | ); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $this->app->singleton( |
| 38 | 38 | 'command.garbageman.purge', |
| 39 | - function ($app) { |
|
| 39 | + function($app) { |
|
| 40 | 40 | return $app->make(PurgeCommand::class); |
| 41 | 41 | } |
| 42 | 42 | ); |
@@ -133,16 +133,16 @@ discard block |
||
| 133 | 133 | public function handle() |
| 134 | 134 | { |
| 135 | 135 | $this->dispatch_purge_events = $this->laravel->make('config') |
| 136 | - ->get( |
|
| 137 | - 'garbageman.dispatch_purge_events', |
|
| 138 | - $this->dispatch_purge_events |
|
| 139 | - ); |
|
| 136 | + ->get( |
|
| 137 | + 'garbageman.dispatch_purge_events', |
|
| 138 | + $this->dispatch_purge_events |
|
| 139 | + ); |
|
| 140 | 140 | |
| 141 | 141 | $this->logging_level = $this->laravel->make('config') |
| 142 | - ->get('garbageman.logging_level', $this->logging_level); |
|
| 142 | + ->get('garbageman.logging_level', $this->logging_level); |
|
| 143 | 143 | |
| 144 | 144 | $schedule = $this->laravel->make('config') |
| 145 | - ->get('garbageman.schedule', []); |
|
| 145 | + ->get('garbageman.schedule', []); |
|
| 146 | 146 | |
| 147 | 147 | foreach ($schedule as $model => $days) { |
| 148 | 148 | $this->purgeExpiredRecordsForModel($model, $days); |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | ->subDays($days); |
| 180 | 180 | |
| 181 | 181 | $query = $this->laravel->make($model) |
| 182 | - ->where('deleted_at', '<', $expiration) |
|
| 183 | - ->onlyTrashed(); |
|
| 182 | + ->where('deleted_at', '<', $expiration) |
|
| 183 | + ->onlyTrashed(); |
|
| 184 | 184 | |
| 185 | 185 | $count = $this->purgeRecordsAsConfigured($query, $model); |
| 186 | 186 | |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | protected function dispatchPurgeEvent($event, $model_name, Model $model, $halt = true) |
| 118 | 118 | { |
| 119 | - $event = "garbageman.{$event}: " . $model_name; |
|
| 119 | + $event = "garbageman.{$event}: ".$model_name; |
|
| 120 | 120 | |
| 121 | 121 | $method = $halt ? 'until' : 'dispatch'; |
| 122 | 122 | |