Passed
Push — master ( 074997...aebabc )
by Sebastian
03:08
created
src/ArrayDataCollection.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * @param array<string,mixed> $data
38 38
      */
39
-    public function __construct(array $data=array())
39
+    public function __construct(array $data = array())
40 40
     {
41 41
         $this->data = $data;
42 42
     }
43 43
 
44
-    public static function create(array $data=array()) : ArrayDataCollection
44
+    public static function create(array $data = array()) : ArrayDataCollection
45 45
     {
46 46
         return new ArrayDataCollection($data);
47 47
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function setKeys(array $data) : self
62 62
     {
63
-        foreach($data as $key => $value)
63
+        foreach ($data as $key => $value)
64 64
         {
65 65
             $this->setKey($key, $value);
66 66
         }
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $value = $this->getKey($name);
130 130
 
131
-        if(is_string($value)) {
131
+        if (is_string($value)) {
132 132
             return $value;
133 133
         }
134 134
 
135
-        if(is_numeric($value)) {
135
+        if (is_numeric($value)) {
136 136
             return (string)$value;
137 137
         }
138 138
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $value = $this->getKey($name);
153 153
 
154
-        if(is_numeric($value)) {
154
+        if (is_numeric($value)) {
155 155
             return (int)$value;
156 156
         }
157 157
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $value = $this->getString($name);
175 175
 
176
-        if(empty($value)) {
176
+        if (empty($value)) {
177 177
             return array();
178 178
         }
179 179
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         {
182 182
             $value = json_decode($value, true, 512, JSON_THROW_ON_ERROR);
183 183
 
184
-            if(is_array($value)) {
184
+            if (is_array($value)) {
185 185
                 return $value;
186 186
             }
187 187
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $value = $this->getKey($name);
213 213
 
214
-        if(is_array($value)) {
214
+        if (is_array($value)) {
215 215
             return $value;
216 216
         }
217 217
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     {
223 223
         $value = $this->getKey($name);
224 224
 
225
-        if(is_string($value)) {
225
+        if (is_string($value)) {
226 226
             $value = strtolower($value);
227 227
         }
228 228
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     {
241 241
         $value = $this->getKey($name);
242 242
 
243
-        if(is_numeric($value)) {
243
+        if (is_numeric($value)) {
244 244
             return (float)$value;
245 245
         }
246 246
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,8 +186,7 @@
 block discarded – undo
186 186
             }
187 187
 
188 188
             return array();
189
-        }
190
-        catch (JsonException $e)
189
+        } catch (JsonException $e)
191 190
         {
192 191
             throw new ArrayDataCollectionException(
193 192
                 'Invalid JSON encountered in array data collection.',
Please login to merge, or discard this patch.