@@ -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 = ModelReferencePresenter::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 | } |
@@ -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 | } |
@@ -136,7 +136,7 @@ |
||
136 | 136 | private function registrationMustExistConstraint(string $key, $value, $registrations): void |
137 | 137 | { |
138 | 138 | if (empty($registrations) && count($registrations) != $this->registrations) { |
139 | - throw new NonRegisteredManager('No manager found for ' . $key . ' [' . print_r($value, true) . ']. Did you perhaps forgot to register the manager?'); |
|
139 | + throw new NonRegisteredManager('No manager found for '.$key.' ['.print_r($value, true).']. Did you perhaps forgot to register the manager?'); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | } |
@@ -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)); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | // If no view has been created for this page collection, we try once again to fetch the content value if any. This will silently fail |
51 | 51 | // if no content value is present. We don't consider the 'content' attribute to be a default as we do for module. |
52 | - return $this->map(function ($item) { |
|
52 | + return $this->map(function($item) { |
|
53 | 53 | return ($this->viewParent && $item instanceof ViewableContract) |
54 | 54 | ? $item->setViewParent($this->viewParent)->renderView() |
55 | 55 | : ($item->content ?? ''); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | { |
83 | 83 | $currentPage = $currentPage ?? request()->get('page', 1); |
84 | 84 | $path = request()->path(); |
85 | - $items = array_slice($this->all(), ($currentPage - 1) * $perPage); |
|
85 | + $items = array_slice($this->all(), ($currentPage-1) * $perPage); |
|
86 | 86 | |
87 | 87 | return (new \Illuminate\Pagination\Paginator($items, $perPage ?? $this->paginateSetting('perPage', '12'), $currentPage))->setPath($path); |
88 | 88 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | public function paginate($perPage = null, $currentPage = null): Paginator |
99 | 99 | { |
100 | 100 | $currentPage = $currentPage ?? request()->get('page', 1); |
101 | - $path = '/' . request()->path(); |
|
102 | - $items = array_slice($this->all(), ($currentPage - 1) * $perPage, $perPage); |
|
101 | + $path = '/'.request()->path(); |
|
102 | + $items = array_slice($this->all(), ($currentPage-1) * $perPage, $perPage); |
|
103 | 103 | |
104 | 104 | return (new \Illuminate\Pagination\LengthAwarePaginator($items, $this->paginateSetting('total', $this->count()), $perPage ?? $this->paginateSetting('perPage', '12'), $currentPage))->setPath($path); |
105 | 105 | } |
@@ -35,12 +35,12 @@ |
||
35 | 35 | |
36 | 36 | public function toReference(): SetReference |
37 | 37 | { |
38 | - $reference = SetReference::all()->first(function ($setReference) { |
|
38 | + $reference = SetReference::all()->first(function($setReference) { |
|
39 | 39 | return $setReference->key() == $this->key; |
40 | 40 | }); |
41 | 41 | |
42 | 42 | if (!$reference) { |
43 | - throw new \Exception('No query set found by key [' . $this->key . ']. Make sure that this ' . $this->key . ' set is added to the chief.sets config array.'); |
|
43 | + throw new \Exception('No query set found by key ['.$this->key.']. Make sure that this '.$this->key.' set is added to the chief.sets config array.'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | return $reference; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function apply($value = null): Closure |
21 | 21 | { |
22 | - return function ($query) use ($value) { |
|
22 | + return function($query) use ($value) { |
|
23 | 23 | if ($value == 'all') { |
24 | 24 | return $query; |
25 | 25 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->pageBuilderField(), |
89 | 89 | InputField::make('title')->translatable($this->model->availableLocales()) |
90 | 90 | ->validation('required-fallback-locale|max:200', [], [ |
91 | - 'trans.' . config('app.fallback_locale', 'nl') . '.title' => 'title', |
|
91 | + 'trans.'.config('app.fallback_locale', 'nl').'.title' => 'title', |
|
92 | 92 | ]) |
93 | 93 | ->label('Intern label') |
94 | 94 | ->description('Dit is de benaming die zal worden getoond in de admin selectie velden.') |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | if (is_array_empty($translation)) { |
211 | 211 | |
212 | 212 | // Nullify all values |
213 | - $trans[$locale] = array_map(function ($value) { |
|
213 | + $trans[$locale] = array_map(function($value) { |
|
214 | 214 | return null; |
215 | 215 | }, $translation); |
216 | 216 | continue; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | continue; |
195 | 195 | } |
196 | 196 | |
197 | - $child = $children->first(function ($c) use ($reference) { |
|
197 | + $child = $children->first(function($c) use ($reference) { |
|
198 | 198 | return $c->modelReference()->get() == $reference; |
199 | 199 | }); |
200 | 200 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | private function stripTagsBlacklist($value, $blacklist = []) |
246 | 246 | { |
247 | 247 | foreach ($blacklist as $tag) { |
248 | - $value = preg_replace('/<\/?' . $tag . '(.|\s)*?>/', '', $value); |
|
248 | + $value = preg_replace('/<\/?'.$tag.'(.|\s)*?>/', '', $value); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return $value; |