Passed
Branch master (fc25ee)
by Team eFabrica
02:44
created
src/Helper/Arr.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
     public static function flatten(array $array, string $prefix = ''): array
10 10
     {
11 11
         $result = array();
12
-        foreach($array as $key=>$value) {
13
-            if(is_array($value)) {
12
+        foreach ($array as $key=>$value) {
13
+            if (is_array($value)) {
14 14
                 $result = $result + self::flatten($value, $prefix . $key . '.');
15 15
             }
16 16
             else {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
         foreach($array as $key=>$value) {
13 13
             if(is_array($value)) {
14 14
                 $result = $result + self::flatten($value, $prefix . $key . '.');
15
-            }
16
-            else {
15
+            } else {
17 16
                 $result[$prefix . $key] = $value;
18 17
             }
19 18
         }
Please login to merge, or discard this patch.