@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public static function bootHasContacts() |
| 22 | 22 | { |
| 23 | - static::deleting(function (self $model) { |
|
| 23 | + static::deleting(function(self $model) { |
|
| 24 | 24 | if (method_exists($model, 'isForceDeleting') && $model->isForceDeleting()) { |
| 25 | 25 | $model->contacts()->forceDelete(); |
| 26 | 26 | |
@@ -67,14 +67,14 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $contacts = collect($contacts) |
| 69 | 69 | ->flatten() |
| 70 | - ->map(function ($contact) { |
|
| 70 | + ->map(function($contact) { |
|
| 71 | 71 | if (empty($contact)) { |
| 72 | 72 | return false; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | return $this->getStoredContact($contact); |
| 76 | 76 | }) |
| 77 | - ->filter(function ($contact) { |
|
| 77 | + ->filter(function($contact) { |
|
| 78 | 78 | return $contact instanceof Contact; |
| 79 | 79 | }) |
| 80 | 80 | ->map->id |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $class = \get_class($model); |
| 90 | 90 | |
| 91 | 91 | $class::saved( |
| 92 | - function ($object) use ($contacts, $model) { |
|
| 92 | + function($object) use ($contacts, $model) { |
|
| 93 | 93 | static $modelLastFiredOn; |
| 94 | 94 | if ($modelLastFiredOn !== null && $modelLastFiredOn === $model) { |
| 95 | 95 | return; |
@@ -191,14 +191,12 @@ discard block |
||
| 191 | 191 | { |
| 192 | 192 | if (is_int($contacts) && $this->hasContact($contacts)) { |
| 193 | 193 | return $force ? |
| 194 | - $this->contacts()->where('id', $contacts)->forceDelete() : |
|
| 195 | - $this->contacts()->where('id', $contacts)->delete(); |
|
| 194 | + $this->contacts()->where('id', $contacts)->forceDelete() : $this->contacts()->where('id', $contacts)->delete(); |
|
| 196 | 195 | } |
| 197 | 196 | |
| 198 | 197 | if ($contacts instanceof Contact && $this->hasContact($contacts)) { |
| 199 | 198 | return $force ? |
| 200 | - $this->contacts()->where('id', $contacts->id)->forceDelete() : |
|
| 201 | - $this->contacts()->where('id', $contacts->id)->delete(); |
|
| 199 | + $this->contacts()->where('id', $contacts->id)->forceDelete() : $this->contacts()->where('id', $contacts->id)->delete(); |
|
| 202 | 200 | } |
| 203 | 201 | |
| 204 | 202 | if (is_array($contacts)) { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $filesystem = $this->app->make(Filesystem::class); |
| 60 | 60 | |
| 61 | 61 | return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
| 62 | - ->flatMap(function ($path) use ($filesystem, $migrationFileName) { |
|
| 62 | + ->flatMap(function($path) use ($filesystem, $migrationFileName) { |
|
| 63 | 63 | return $filesystem->glob($path.'*_'.$migrationFileName); |
| 64 | 64 | }) |
| 65 | 65 | ->push($this->app->databasePath()."/migrations/{$timestamp}_{$migrationFileName}") |