Conditions | 5 |
Paths | 8 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public static function fixConfig(array $config): array |
||
13 | { |
||
14 | $remove = false; |
||
15 | foreach ($config as $key => &$value) { |
||
16 | if (is_array($value)) { |
||
17 | $value = static::fixConfig($value); |
||
18 | } elseif ($value instanceof RemoveArrayKeys) { |
||
19 | $remove = true; |
||
20 | unset($config[$key]); |
||
21 | } |
||
22 | } |
||
23 | if ($remove) { |
||
24 | return array_values($config); |
||
25 | } |
||
26 | |||
27 | return $config; |
||
28 | } |
||
75 |