@@ -13,14 +13,14 @@ discard block |
||
| 13 | 13 | function set_path(array &$haystack, string $path, $value, string $separator = '.'): void |
| 14 | 14 | { |
| 15 | 15 | $path = explode($separator, $path); |
| 16 | - $temp =& $haystack; |
|
| 16 | + $temp = & $haystack; |
|
| 17 | 17 | |
| 18 | 18 | foreach ($path as $key) { |
| 19 | 19 | if (!is_array($temp)) { |
| 20 | 20 | $temp = []; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - $temp =& $temp[$key]; |
|
| 23 | + $temp = & $temp[$key]; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | $temp = $value; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | return |
| 60 | 60 | array_reduce( |
| 61 | 61 | explode($separator, $path), |
| 62 | - fn ($arr, $p) => is_array($arr) && array_key_exists($p, $arr) ? $arr[$p] : $default, |
|
| 62 | + fn($arr, $p) => is_array($arr) && array_key_exists($p, $arr) ? $arr[$p] : $default, |
|
| 63 | 63 | $haystack |
| 64 | 64 | ); |
| 65 | 65 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | $target = &$haystack; |
| 108 | 108 | foreach ($keys as $innerKey) { |
| 109 | - if (! is_array($target)) { |
|
| 109 | + if (!is_array($target)) { |
|
| 110 | 110 | break; |
| 111 | 111 | } |
| 112 | 112 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $target = $haystack; |
| 136 | 136 | foreach ($keys as $innerKey) { |
| 137 | - if (! is_array($target) || ! array_key_exists($innerKey, $target)) { |
|
| 137 | + if (!is_array($target) || !array_key_exists($innerKey, $target)) { |
|
| 138 | 138 | return false; |
| 139 | 139 | } |
| 140 | 140 | |