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