@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $registrations = collect($this->register->filterByTag($tag)->all()); |
| 52 | 52 | |
| 53 | - return $registrations->map(function ($registration) { |
|
| 53 | + return $registrations->map(function($registration) { |
|
| 54 | 54 | return $this->instance($registration); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $registrations = collect($this->register->filterByTag($tag)->all()); |
| 67 | 67 | |
| 68 | - return $registrations->map(function ($registration) { |
|
| 68 | + return $registrations->map(function($registration) { |
|
| 69 | 69 | return $this->instance($registration)->details(); |
| 70 | 70 | }); |
| 71 | 71 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | //return array with group name and values |
| 77 | 77 | $grouped = []; |
| 78 | 78 | |
| 79 | - $managers = $managers->map(function (Manager $item) { |
|
| 79 | + $managers = $managers->map(function(Manager $item) { |
|
| 80 | 80 | return [ |
| 81 | 81 | 'id' => $item->details()->id, |
| 82 | 82 | 'group' => $item->details()->plural, |
@@ -90,14 +90,14 @@ discard block |
||
| 90 | 90 | { |
| 91 | 91 | $registrations = collect($this->register->all()); |
| 92 | 92 | |
| 93 | - return $registrations->map(function ($registration) { |
|
| 93 | + return $registrations->map(function($registration) { |
|
| 94 | 94 | return $this->instance($registration); |
| 95 | 95 | }); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | public function anyRegisteredByTag($tag) |
| 99 | 99 | { |
| 100 | - return ! empty($this->register->filterByTag($tag)->all()); |
|
| 100 | + return !empty($this->register->filterByTag($tag)->all()); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | public function findAllArchived(): Collection |
| 51 | 51 | { |
| 52 | - return $this->manager->modelInstance()::archived()->get()->map(function ($model) { |
|
| 52 | + return $this->manager->modelInstance()::archived()->get()->map(function($model) { |
|
| 53 | 53 | return $this->managers->findByModel($model); |
| 54 | 54 | }); |
| 55 | 55 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | public function route($verb): ?string |
| 58 | 58 | { |
| 59 | 59 | $routes = [ |
| 60 | - 'index' => route('chief.back.assistants.view', [$this->key(),'index', $this->manager->managerKey()]), |
|
| 60 | + 'index' => route('chief.back.assistants.view', [$this->key(), 'index', $this->manager->managerKey()]), |
|
| 61 | 61 | ]; |
| 62 | 62 | |
| 63 | 63 | if (array_key_exists($verb, $routes)) { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | throw new \InvalidArgumentException('ArchiveAssistant requires the model to implement the StatefulContract. ['.get_class($this->manager->existingModel()).'] given instead.'); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if (! $this->can($verb)) { |
|
| 86 | + if (!$this->can($verb)) { |
|
| 87 | 87 | NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | // Ok now get all urls from this model and point them to the new records |
| 112 | 112 | foreach (UrlRecord::getByModel($this->manager->existingModel()) as $urlRecord) { |
| 113 | - if ($targetRecord = $targetRecords->first(function ($record) use ($urlRecord) { |
|
| 113 | + if ($targetRecord = $targetRecords->first(function($record) use ($urlRecord) { |
|
| 114 | 114 | return ($record->locale == $urlRecord->locale && !$record->isRedirect()); |
| 115 | 115 | })) { |
| 116 | 116 | $urlRecord->redirectTo($targetRecord); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | app(ArchiveManagedModel::class)->handle($this->manager->existingModel()); |
| 122 | 122 | |
| 123 | - return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title .' is gearchiveerd.'); |
|
| 123 | + return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is gearchiveerd.'); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | public function unarchive() |
@@ -129,6 +129,6 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | app(UnArchiveManagedModel::class)->handle($this->manager->existingModel()); |
| 131 | 131 | |
| 132 | - return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title .' is hersteld.'); |
|
| 132 | + return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is hersteld.'); |
|
| 133 | 133 | } |
| 134 | 134 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | // Mark the slug as deleted to avoid any conflict with newly created modules with the same slug. |
| 32 | 32 | if ($model instanceof Module) { |
| 33 | 33 | $model->update([ |
| 34 | - 'slug' => $model->slug . $this->appendDeleteMarker(), |
|
| 34 | + 'slug' => $model->slug.$this->appendDeleteMarker(), |
|
| 35 | 35 | ]); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -58,6 +58,6 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | private function appendDeleteMarker(): string |
| 60 | 60 | { |
| 61 | - return '_DELETED_' . time(); |
|
| 61 | + return '_DELETED_'.time(); |
|
| 62 | 62 | } |
| 63 | 63 | } |