@@ -51,7 +51,7 @@ |
||
51 | 51 | public function assistant(string $assistantKey): Assistant |
52 | 52 | { |
53 | 53 | if (!$this->isAssistedBy($assistantKey)) { |
54 | - throw new MissingAssistant('No assistant [' . $assistantKey . '] registered on manager ' . static::class); |
|
54 | + throw new MissingAssistant('No assistant ['.$assistantKey.'] registered on manager '.static::class); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $instance = app($this->getAssistantClass($assistantKey)); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $this->manager = $manager; |
40 | 40 | $this->model = $manager->model(); |
41 | 41 | |
42 | - if(!$this->model instanceof StatefulContract){ |
|
42 | + if (!$this->model instanceof StatefulContract) { |
|
43 | 43 | throw new \InvalidArgumentException('ArchiveAssistant requires the model to implement the StatefulContract.'); |
44 | 44 | } |
45 | 45 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | public function findAllArchived(): Collection |
58 | 58 | { |
59 | - return $this->model->archived()->get()->map(function ($model) { |
|
59 | + return $this->model->archived()->get()->map(function($model) { |
|
60 | 60 | return $this->managers->findByModel($model); |
61 | 61 | }); |
62 | 62 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | private function guard($verb): Assistant |
88 | 88 | { |
89 | - if (! $this->can($verb)) { |
|
89 | + if (!$this->can($verb)) { |
|
90 | 90 | NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager); |
91 | 91 | } |
92 | 92 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | // Ok now get all urls from this model and point them to the new records |
115 | 115 | foreach (UrlRecord::getByModel($this->manager->model()) as $urlRecord) { |
116 | - if ($targetRecord = $targetRecords->first(function ($record) use ($urlRecord) { |
|
116 | + if ($targetRecord = $targetRecords->first(function($record) use ($urlRecord) { |
|
117 | 117 | return ($record->locale == $urlRecord->locale && !$record->isRedirect()); |
118 | 118 | })) { |
119 | 119 | $urlRecord->redirectTo($targetRecord); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | app(ArchiveManagedModel::class)->handle($this->model); |
125 | 125 | |
126 | - return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title .' is gearchiveerd.'); |
|
126 | + return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is gearchiveerd.'); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | public function unarchive() |
@@ -132,6 +132,6 @@ discard block |
||
132 | 132 | |
133 | 133 | app(UnArchiveManagedModel::class)->handle($this->model); |
134 | 134 | |
135 | - return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title .' is hersteld.'); |
|
135 | + return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is hersteld.'); |
|
136 | 136 | } |
137 | 137 | } |