Test Setup Failed
Push — a-simpler-manager ( 964eee...986de8 )
by Ben
07:36
created
src/ManagedModels/States/State/StateException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 {
7 7
     public static function invalidState($state, $currentState, $stateMachine)
8 8
     {
9
-        return new self('Transition to state [' . $state . '] is not allowed from state [' . $currentState . '] or state does not exist on ' . get_class($stateMachine));
9
+        return new self('Transition to state ['.$state.'] is not allowed from state ['.$currentState.'] or state does not exist on '.get_class($stateMachine));
10 10
     }
11 11
 
12 12
     public static function malformedTransition($transition, $stateMachine)
13 13
     {
14
-        return new self('Transition [' . $transition . '] is malformed on ' . get_class($stateMachine) . '. It should contain both a [from:array] and [to:string] value.');
14
+        return new self('Transition ['.$transition.'] is malformed on '.get_class($stateMachine).'. It should contain both a [from:array] and [to:string] value.');
15 15
     }
16 16
 
17 17
     public static function invalidTransitionKey($transition, $stateMachine)
18 18
     {
19
-        return new self('unknown transition [' . $transition . '] on ' . get_class($stateMachine));
19
+        return new self('unknown transition ['.$transition.'] on '.get_class($stateMachine));
20 20
     }
21 21
 
22 22
     public static function invalidTransition($transition, $state, $stateMachine)
23 23
     {
24
-        return new self('Transition [' . $transition . '] cannot be applied from current state [' . $state . '] on ' . get_class($stateMachine));
24
+        return new self('Transition ['.$transition.'] cannot be applied from current state ['.$state.'] on '.get_class($stateMachine));
25 25
     }
26 26
 
27 27
     public static function invalidTransitionState($transition, $state, $stateMachine)
28 28
     {
29
-        return new self('Transition [' . $transition . '] contains a non existing [' . $state . '] on ' . get_class($stateMachine));
29
+        return new self('Transition ['.$transition.'] contains a non existing ['.$state.'] on '.get_class($stateMachine));
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/ManagedModels/States/Publishable/CheckPreviewTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
             Session::now('note.default', 'U bekijkt een preview.');
13 13
 
14 14
             return true;
15
-        } else {
15
+        }else {
16 16
             return false;
17 17
         }
18 18
     }
Please login to merge, or discard this patch.
src/ManagedModels/Filters/AbstractFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 
81 81
     public function render(): string
82 82
     {
83
-        $path = $this->view ?? 'chief::back._filters.' . $this->type;
83
+        $path = $this->view ?? 'chief::back._filters.'.$this->type;
84 84
 
85 85
         return view($path, $this->viewData())->render();
86 86
     }
Please login to merge, or discard this patch.
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/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.