Test Setup Failed
Push — a-simpler-manager ( 9beba5...d99f82 )
by Ben
06:26
created
src/ManagedModels/Filters/Presets/CheckboxFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/ManagedModels/Filters/Presets/RadioFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/ManagedModels/Filters/Presets/SelectFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
         ]);
Please login to merge, or discard this patch.
src/ManagedModels/Filters/Filters.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/ManagedModels/Filters/FilterType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/ManagedModels/Templates/ApplyTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/ManagedModels/Templates/PageTemplateApplicator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ManagedModels/Fields/Validation/ValidationNames.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/ManagedModels/Fields/Validation/ValidationParameters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.