Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
28 | 20 | public static function unflatten(array $array): array |
|
29 | { |
||
30 | 20 | $output = []; |
|
31 | 20 | foreach ($array as $key => $value) { |
|
32 | 20 | self::set($output, $key, $value); |
|
33 | 20 | if (is_array($value) && strpos($key, '.') === false) { |
|
34 | 20 | $output[$key] = static::unflatten($value); |
|
35 | } |
||
36 | } |
||
37 | 20 | return $output; |
|
38 | } |
||
39 | |||
57 | } |