| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 5 |
| Ratio | 45.45 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | 6 | } |
|
| 18 | 9 | return $result; |
|
| 19 | } |
||
| 20 | |||
| 21 | 9 | public function deepen($keys, $value, $index = 0, $carry = []) |
|
| 22 | { |
||
| 23 | 9 | if (array_key_exists($index + 1, $keys)) { |
|
| 24 | 9 | $carry[$keys[$index]] = $this->deepen($keys, $value, $index + 1); |
|
| 25 | 6 | } else { |
|
| 26 | 9 | $carry[$keys[$index]] = $value; |
|
| 27 | } |
||
| 28 | 9 | return $carry; |
|
| 31 |