| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | private function walkKeyIndexArray(array $values = []) |
||
| 44 | { |
||
| 45 | $result = []; |
||
| 46 | |||
| 47 | foreach ($values as $path => $value) { |
||
| 48 | $this->currentPath->moveTo($path); |
||
| 49 | |||
| 50 | if (is_array($value)) { |
||
| 51 | $childResult = $this->walkKeyIndexArray($value); |
||
| 52 | $result = array_merge($result, $childResult); |
||
| 53 | } else { |
||
| 54 | $key = (string) $this->currentPath; |
||
| 55 | $result[$key] = $value; |
||
| 56 | } |
||
| 57 | |||
| 58 | $this->currentPath->moveParent(); |
||
| 59 | } |
||
| 60 | |||
| 61 | return $result; |
||
| 62 | } |
||
| 63 | |||
| 65 |