Test Failed
Push — fix ( 6ca107 )
by Enjoys
12:04
created
src/Form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,11 +207,11 @@
 block discarded – undo
207 207
      */
208 208
     public function setDefaults($data): self
209 209
     {
210
-        if($data instanceof \Closure){
210
+        if ($data instanceof \Closure) {
211 211
             $data = $data();
212 212
         }
213 213
 
214
-        if(!is_array($data)){
214
+        if (!is_array($data)) {
215 215
             throw new \InvalidArgumentException('Invalid argument, expected array or closure with retun array.');
216 216
         }
217 217
 
Please login to merge, or discard this patch.
src/Traits/Fill.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,11 +74,11 @@
 block discarded – undo
74 74
     public function fill($data, $useTitleAsValue = false): self
75 75
     {
76 76
 
77
-        if($data instanceof \Closure){
77
+        if ($data instanceof \Closure) {
78 78
             $data = $data();
79 79
         }
80 80
 
81
-        if(!is_array($data)){
81
+        if (!is_array($data)) {
82 82
             throw new \InvalidArgumentException('Fill data must be array or closure returned array');
83 83
         }
84 84
 
Please login to merge, or discard this patch.
src/Traits/Attributes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 $key = $value;
58 58
                 $value = null;
59 59
             }
60
-            $this->setAttribute((string)$key, $value, $namespace);
60
+            $this->setAttribute((string) $key, $value, $namespace);
61 61
         }
62 62
         return $this;
63 63
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         if (in_array($name, ['class'])) {
81 81
             if (
82 82
                 isset($this->attributes[$namespace][$name]) &&
83
-                in_array($value, (array)$this->attributes[$namespace][$name])
83
+                in_array($value, (array) $this->attributes[$namespace][$name])
84 84
             ) {
85 85
                 return $this;
86 86
             }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             }
195 195
             return $this;
196 196
         }
197
-        $values = explode(" ", (string)$class);
197
+        $values = explode(" ", (string) $class);
198 198
         foreach ($values as $value) {
199 199
             $this->setAttribute('class', $value, $namespace);
200 200
         }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             return $this;
215 215
         }
216 216
 
217
-        if (false !== $key = array_search($classValue, (array)$this->attributes[$namespace]['class'])) {
217
+        if (false !== $key = array_search($classValue, (array) $this->attributes[$namespace]['class'])) {
218 218
             unset($this->attributes[$namespace]['class'][$key]);
219 219
         }
220 220
         return $this;
Please login to merge, or discard this patch.
src/FillHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
     public function __construct($value, $title, $useTitleAsValue = false)
53 53
     {
54 54
         if (is_array($title)) {
55
-            $this->title = (string)$title[0];
55
+            $this->title = (string) $title[0];
56 56
 
57 57
             if (isset($title[1]) && is_array($title[1])) {
58 58
                 $this->attributes = array_merge($this->attributes, $title[1]);
59 59
             }
60 60
         }
61 61
 
62
-        $this->title ??= (string)$title;
62
+        $this->title ??= (string) $title;
63 63
 
64 64
         /** @since 2.4.0 */
65 65
         if (is_string($value)) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
     public function getValue(): ?string
88 88
     {
89
-        return (string)$this->value;
89
+        return (string) $this->value;
90 90
     }
91 91
 
92 92
     public function getLabel(): ?string
Please login to merge, or discard this patch.