@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ->performedOn($this->manager->existingModel()) |
60 | 60 | ->log('published'); |
61 | 61 | |
62 | - return redirect()->to($this->manager->route('edit'))->with('messages.success', $this->manager->details()->title . ' is online gezet.'); |
|
62 | + return redirect()->to($this->manager->route('edit'))->with('messages.success', $this->manager->details()->title.' is online gezet.'); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | public function unpublish() |
@@ -73,12 +73,12 @@ discard block |
||
73 | 73 | ->performedOn($this->manager->existingModel()) |
74 | 74 | ->log('unpublished'); |
75 | 75 | |
76 | - return redirect()->to($this->manager->route('edit'))->with('messages.success', $this->manager->details()->title . ' is offline gehaald.'); |
|
76 | + return redirect()->to($this->manager->route('edit'))->with('messages.success', $this->manager->details()->title.' is offline gehaald.'); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public function findAll(): Collection |
80 | 80 | { |
81 | - return $this->manager->existingModel()->published()->get()->map(function ($model) { |
|
81 | + return $this->manager->existingModel()->published()->get()->map(function($model) { |
|
82 | 82 | return $this->managers->findByModel($model); |
83 | 83 | }); |
84 | 84 | } |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | $class = 'text-warning'; |
130 | 130 | } |
131 | 131 | |
132 | - $statusAsLabel = '<span class="font-bold ' . $class . '"><em>' . $label . '</em></span>'; |
|
132 | + $statusAsLabel = '<span class="font-bold '.$class.'"><em>'.$label.'</em></span>'; |
|
133 | 133 | |
134 | 134 | if (!$plain && $this->hasPreviewUrl()) { |
135 | - $statusAsLabel = '<a href="' . $this->previewUrl() . '" target="_blank">' . $statusAsLabel . '</a>'; |
|
135 | + $statusAsLabel = '<a href="'.$this->previewUrl().'" target="_blank">'.$statusAsLabel.'</a>'; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | return $statusAsLabel; |
@@ -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); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ->performedOn($this->manager->existingModel()) |
128 | 128 | ->log('archived'); |
129 | 129 | |
130 | - return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title .' is gearchiveerd.'); |
|
130 | + return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is gearchiveerd.'); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | public function unarchive() |
@@ -143,6 +143,6 @@ discard block |
||
143 | 143 | ->performedOn($this->manager->existingModel()) |
144 | 144 | ->log('unarchived'); |
145 | 145 | |
146 | - return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title .' is hersteld.'); |
|
146 | + return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is hersteld.'); |
|
147 | 147 | } |
148 | 148 | } |