@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | public static function modelsByType(array $types, Model $ignoredModel = null, bool $online = true) |
91 | 91 | { |
92 | - $models = chiefMemoize('all-online-models', function () use ($types, $online) { |
|
92 | + $models = chiefMemoize('all-online-models', function() use ($types, $online) { |
|
93 | 93 | $builder = UrlRecord::whereNull('redirect_id') |
94 | 94 | ->select('model_type', 'model_id') |
95 | 95 | ->groupBy('model_type', 'model_id'); |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | $builder->whereIn('model_type', $types); |
99 | 99 | } |
100 | 100 | |
101 | - return $builder->get()->mapToGroups(function ($record) { |
|
101 | + return $builder->get()->mapToGroups(function($record) { |
|
102 | 102 | return [$record->model_type => $record->model_id]; |
103 | - })->map(function ($record, $key) { |
|
103 | + })->map(function($record, $key) { |
|
104 | 104 | return Morphables::instance($key)->find($record->toArray()); |
105 | - })->map->reject(function ($model) use ($online) { |
|
105 | + })->map->reject(function($model) use ($online) { |
|
106 | 106 | if ($online) { |
107 | 107 | return is_null($model) || !$model->isPublished(); |
108 | 108 | } // Invalid references to archived or removed models where url record still exists. |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | }); |
113 | 113 | |
114 | 114 | if ($ignoredModel) { |
115 | - $models = $models->reject(function ($model) use ($ignoredModel) { |
|
115 | + $models = $models->reject(function($model) use ($ignoredModel) { |
|
116 | 116 | return (get_class($model) === get_class($ignoredModel) && $model->id === $ignoredModel->id); |
117 | 117 | }); |
118 | 118 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | return static::$managedModelKey; |
102 | 102 | } |
103 | 103 | |
104 | - throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class . '.'); |
|
104 | + throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.'); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | public function flatReferenceLabel(): string |
142 | 142 | { |
143 | 143 | if ($this->exists) { |
144 | - $status = !$this->isPublished() ? ' [' . $this->statusAsPlainLabel() . ']' : null; |
|
144 | + $status = !$this->isPublished() ? ' ['.$this->statusAsPlainLabel().']' : null; |
|
145 | 145 | |
146 | - return $this->title ? $this->title . $status : ''; |
|
146 | + return $this->title ? $this->title.$status : ''; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | return ''; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $classKey = get_class($this); |
155 | 155 | if (property_exists($this, 'labelSingular')) { |
156 | 156 | $labelSingular = $this->labelSingular; |
157 | - } else { |
|
157 | + }else { |
|
158 | 158 | $labelSingular = Str::singular($classKey); |
159 | 159 | } |
160 | 160 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $locale = app()->getLocale(); |
195 | 195 | } |
196 | 196 | try { |
197 | - $memoizedKey = $this->getMorphClass() . '-' . $this->id . '-' . $locale; |
|
197 | + $memoizedKey = $this->getMorphClass().'-'.$this->id.'-'.$locale; |
|
198 | 198 | |
199 | 199 | if (isset(static::$cachedUrls[$memoizedKey])) { |
200 | 200 | return static::$cachedUrls[$memoizedKey]; |
@@ -218,11 +218,11 @@ discard block |
||
218 | 218 | /** @inheritdoc */ |
219 | 219 | public function previewUrl(string $locale = null): string |
220 | 220 | { |
221 | - if($this->isPublished()) { |
|
221 | + if ($this->isPublished()) { |
|
222 | 222 | return $this->url($locale); |
223 | 223 | } |
224 | 224 | |
225 | - return $this->url($locale) . '?preview-mode'; |
|
225 | + return $this->url($locale).'?preview-mode'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | public function statusAsLabel() |
262 | 262 | { |
263 | 263 | if ($this->isPublished()) { |
264 | - return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>'; |
|
264 | + return '<a href="'.$this->url().'" target="_blank"><em>online</em></a>'; |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | if ($this->isDraft()) { |
268 | - return '<a href="' . $this->previewUrl() . '" target="_blank" class="text-error"><em>offline</em></a>'; |
|
268 | + return '<a href="'.$this->previewUrl().'" target="_blank" class="text-error"><em>offline</em></a>'; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | if ($this->isArchived()) { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | public function message(): string |
35 | 35 | { |
36 | - return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="' . route('chief.back.settings.edit') . '" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.'; |
|
36 | + return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function notifiers(): array |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | public function message(): string |
18 | 18 | { |
19 | - return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="' . route('chief.back.settings.edit') . '" class="text-secondary-800 underline hover:text-white">Settings</a>'; |
|
19 | + return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Settings</a>'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function notifiers(): array |
@@ -32,7 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | return; |
35 | - } else { |
|
35 | + }else { |
|
36 | 36 | foreach ($notifiers as $notifier) { |
37 | 37 | app($notifier)->onSuccess($checkInstance); |
38 | 38 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $availableChildren = AvailableChildren::forParent($model); |
51 | 51 | |
52 | - $modules = $availableChildren->onlyModules()->reject(function ($module) use ($model) { |
|
52 | + $modules = $availableChildren->onlyModules()->reject(function($module) use ($model) { |
|
53 | 53 | return $module->owner_id != null && $module->owner_id != $model->id; |
54 | 54 | }); |
55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $available_sets = FlatReferencePresenter::toGroupedSelectValues($availableChildren->onlySets())->toArray(); |
59 | 59 | |
60 | 60 | // Current sections |
61 | - $sections = $model->children()->map(function ($section, $index) { |
|
61 | + $sections = $model->children()->map(function($section, $index) { |
|
62 | 62 | if ($section instanceof TranslatableContract) { |
63 | 63 | $section->injectTranslationForForm(); |
64 | 64 | } |