Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Arcanesoft\Settings\Helpers; |
||
21 | 24 | public static function dot($array, $prepend = '') |
|
22 | { |
||
23 | 24 | $results = []; |
|
24 | |||
25 | 24 | foreach ($array as $key => $value) { |
|
26 | 24 | if (is_array($value)) { |
|
27 | 8 | if (self::isAssoc($value)) { |
|
28 | 4 | $results = array_merge($results, self::dot($value, $prepend.$key.'.')); |
|
29 | |||
30 | 4 | continue; |
|
31 | } |
||
32 | 3 | } |
|
33 | |||
34 | 24 | $results[$prepend.$key] = $value; |
|
35 | 18 | } |
|
36 | |||
37 | 24 | return $results; |
|
38 | } |
||
39 | } |
||
40 |