@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | protected function viewData(): array |
30 | 30 | { |
31 | - return array_merge( parent::viewData(),[ |
|
31 | + return array_merge(parent::viewData(), [ |
|
32 | 32 | 'options' => $this->options, |
33 | 33 | ]); |
34 | 34 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | protected function viewData(): array |
38 | 38 | { |
39 | - return array_merge( parent::viewData(),[ |
|
39 | + return array_merge(parent::viewData(), [ |
|
40 | 40 | 'options' => $this->options, |
41 | 41 | 'multiple' => $this->multiple, |
42 | 42 | ]); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | |
35 | 35 | public function render(): string |
36 | 36 | { |
37 | - return array_reduce($this->all(), function ($carry, Filter $filter) { |
|
38 | - return $carry . $filter->render(); |
|
37 | + return array_reduce($this->all(), function($carry, Filter $filter) { |
|
38 | + return $carry.$filter->render(); |
|
39 | 39 | }, ''); |
40 | 40 | } |
41 | 41 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | |
47 | 47 | public function anyRenderable(): bool |
48 | 48 | { |
49 | - if($this->isEmpty()) return false; |
|
49 | + if ($this->isEmpty()) return false; |
|
50 | 50 | |
51 | 51 | // If at least one of the filters has content to be rendered. |
52 | - foreach($this->filters as $filter) { |
|
53 | - if($filter->render()) { |
|
52 | + foreach ($this->filters as $filter) { |
|
53 | + if ($filter->render()) { |
|
54 | 54 | return true; |
55 | 55 | } |
56 | 56 | } |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | |
66 | 66 | public function keys(): array |
67 | 67 | { |
68 | - return array_map(function (AbstractFilter $filter) { |
|
68 | + return array_map(function(AbstractFilter $filter) { |
|
69 | 69 | return $filter->key(); |
70 | 70 | }, $this->filters); |
71 | 71 | } |
72 | 72 | |
73 | 73 | private function validateFilters(array $filters) |
74 | 74 | { |
75 | - array_map(function (Filter $filter) {}, $filters); |
|
75 | + array_map(function(Filter $filter) {}, $filters); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | public function add(Filter ...$filter) |
@@ -46,7 +46,9 @@ |
||
46 | 46 | |
47 | 47 | public function anyRenderable(): bool |
48 | 48 | { |
49 | - if($this->isEmpty()) return false; |
|
49 | + if($this->isEmpty()) { |
|
50 | + return false; |
|
51 | + } |
|
50 | 52 | |
51 | 53 | // If at least one of the filters has content to be rendered. |
52 | 54 | foreach($this->filters as $filter) { |
@@ -6,9 +6,9 @@ |
||
6 | 6 | |
7 | 7 | class FilterType |
8 | 8 | { |
9 | - const HIDDEN = 'hidden'; // hidden input - default sorting or filtering without admin manipulation possible |
|
10 | - const INPUT = 'input'; // oneliner text (input) |
|
11 | - const SELECT = 'select'; // Select options |
|
9 | + const HIDDEN = 'hidden'; // hidden input - default sorting or filtering without admin manipulation possible |
|
10 | + const INPUT = 'input'; // oneliner text (input) |
|
11 | + const SELECT = 'select'; // Select options |
|
12 | 12 | const CHECKBOX = 'checkbox'; |
13 | 13 | const RADIO = 'radio'; |
14 | 14 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
39 | - $availableApplicatorsString = implode(array_map(function ($applicator) { return get_class($applicator);}, $this->applicators), ','); |
|
39 | + $availableApplicatorsString = implode(array_map(function($applicator) { return get_class($applicator); }, $this->applicators), ','); |
|
40 | 40 | |
41 | 41 | throw new \RuntimeException("No proper template applicator found. $sourceClassName [$sourceId] cannot be applied as template. Available applicators: [$availableApplicatorsString]"); |
42 | 42 | } |
@@ -53,13 +53,13 @@ |
||
53 | 53 | |
54 | 54 | if ($child instanceof Module && $child->isPageSpecific()) { |
55 | 55 | $duplicatedChild = $child::create([ |
56 | - 'slug' => $targetModel->title ? $targetModel->title . '-' . $child->slug : $child->slug . '-copy', |
|
56 | + 'slug' => $targetModel->title ? $targetModel->title.'-'.$child->slug : $child->slug.'-copy', |
|
57 | 57 | 'owner_id' => $targetModel->id, |
58 | 58 | 'owner_type' => $targetModel->getMorphClass() |
59 | 59 | ]); |
60 | 60 | |
61 | 61 | $this->moduleTemplateApplicator->handle($child, $duplicatedChild); |
62 | - } else { |
|
62 | + }else { |
|
63 | 63 | $duplicatedChild = $child; |
64 | 64 | } |
65 | 65 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | foreach ($replacements as $replacement) { |
97 | - $newKeySet[] = str_replace(':' . $placeholder, $replacement, $key); |
|
97 | + $newKeySet[] = str_replace(':'.$placeholder, $replacement, $key); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | // Remove all 'trans' entries for this locale |
144 | 144 | foreach ($filteredKeys as $i => $key) { |
145 | - if (Str::startsWith($key, 'trans.' . $locale)) { |
|
145 | + if (Str::startsWith($key, 'trans.'.$locale)) { |
|
146 | 146 | unset($filteredKeys[$i]); |
147 | 147 | } |
148 | 148 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $payload = Arr::get($this->payload, $key, '_notfound_'); |
164 | 164 | |
165 | 165 | // If the payload is empty and this is not the entry for the required locale |
166 | - if ($payload !== '_notfound_' && !$payload && !Str::endsWith($key, '.' . $this->requiredLocale)) { |
|
166 | + if ($payload !== '_notfound_' && !$payload && !Str::endsWith($key, '.'.$this->requiredLocale)) { |
|
167 | 167 | unset($filteredKeys[$i]); |
168 | 168 | } |
169 | 169 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | if (isset($customRules[$rule])) { |
52 | - $rules[$k] = $customRules[$rule] . ($params ? ':' . $params : ''); |
|
52 | + $rules[$k] = $customRules[$rule].($params ? ':'.$params : ''); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function tagged($tag): bool |
10 | 10 | { |
11 | - $tags = (array) $tag; |
|
11 | + $tags = (array)$tag; |
|
12 | 12 | |
13 | 13 | return count(array_intersect($this->tags, $tags)) > 0; |
14 | 14 | } |