@@ -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,7 +90,7 @@ 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 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $availableChildren = AvailableChildren::forParent($model); |
50 | 50 | |
51 | - $modules = $availableChildren->onlyModules()->reject(function ($module) use ($model) { |
|
51 | + $modules = $availableChildren->onlyModules()->reject(function($module) use ($model) { |
|
52 | 52 | return $module->page_id != null && $module->page_id != $model->id; |
53 | 53 | }); |
54 | 54 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $available_sets = FlatReferencePresenter::toGroupedSelectValues($availableChildren->onlySets())->toArray(); |
58 | 58 | |
59 | 59 | // Current sections |
60 | - $sections = $model->children()->map(function ($section, $index) { |
|
60 | + $sections = $model->children()->map(function($section, $index) { |
|
61 | 61 | if ($section instanceof TranslatableContract) { |
62 | 62 | $section->injectTranslationForForm(); |
63 | 63 | } |
@@ -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)); |
@@ -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 | } |
@@ -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="' . $class . '">' . $label . '</span>'; |
|
132 | + $statusAsLabel = '<span class="'.$class.'">'.$label.'</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; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $images = []; |
26 | 26 | $locale = $locale ?? app()->getLocale(); |
27 | 27 | |
28 | - $assets = $model->assetRelation->where('pivot.type', $this->getKey())->filter(function ($asset) use ($locale) { |
|
28 | + $assets = $model->assetRelation->where('pivot.type', $this->getKey())->filter(function($asset) use ($locale) { |
|
29 | 29 | return $asset->pivot->locale == $locale; |
30 | 30 | })->sortBy('pivot.order'); |
31 | 31 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * Therefore the index of these modules is at the modules tab of this page model. |
34 | 34 | */ |
35 | 35 | if ($verb == 'index' && $this->model->isPageSpecific()) { |
36 | - return app(Managers::class)->findByModel($this->model->page)->route('edit') . '#eigen-modules'; |
|
36 | + return app(Managers::class)->findByModel($this->model->page)->route('edit').'#eigen-modules'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | $routes = [ |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | if (is_array_empty($translation)) { |
154 | 154 | |
155 | 155 | // Nullify all values |
156 | - $trans[$locale] = array_map(function ($value) { |
|
156 | + $trans[$locale] = array_map(function($value) { |
|
157 | 157 | return null; |
158 | 158 | }, $translation); |
159 | 159 | continue; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | return static::$managedModelKey; |
70 | 70 | } |
71 | 71 | |
72 | - throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class . '.'); |
|
72 | + throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.'); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public static function availableForCreation(): Collection |
81 | 81 | { |
82 | - $managers = app(Managers::class)->findByTag('module')->filter(function ($manager) { |
|
82 | + $managers = app(Managers::class)->findByTag('module')->filter(function($manager) { |
|
83 | 83 | return $manager->can('create'); |
84 | - })->map(function ($manager) { |
|
84 | + })->map(function($manager) { |
|
85 | 85 | return $manager->details(); |
86 | 86 | }); |
87 | 87 |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | |
70 | 70 | // Push update to homepage setting value |
71 | 71 | // TODO: we should just fetch the homepages and push that instead... |
72 | - UrlRecord::getByModel($this->manager->existingModel())->reject(function ($record) { |
|
72 | + UrlRecord::getByModel($this->manager->existingModel())->reject(function($record) { |
|
73 | 73 | return ($record->isRedirect() || !$record->isHomepage()); |
74 | - })->each(function ($record) { |
|
74 | + })->each(function($record) { |
|
75 | 75 | app(ChangeHomepage::class)->onUrlChanged($record); |
76 | 76 | }); |
77 | 77 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | private function validateModel() |
85 | 85 | { |
86 | 86 | if (!$this->manager->existingModel() instanceof ProvidesUrl) { |
87 | - throw new \Exception('UrlAssistant requires the model interfaced by ' . ProvidesUrl::class . '.'); |
|
87 | + throw new \Exception('UrlAssistant requires the model interfaced by '.ProvidesUrl::class.'.'); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |