| Conditions | 3 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | 1 | public function walk(array $result): array |
|
| 9 | { |
||
| 10 | 1 | $camelCased = []; |
|
| 11 | |||
| 12 | 1 | array_walk($result, function ($value, $key) use (&$camelCased) { |
|
| 13 | 1 | $key = is_string($key) ? $this->toCamelCase($key) : $key; |
|
| 14 | |||
| 15 | 1 | if (is_array($value)) { |
|
| 16 | 1 | $camelCased[$key] = $this->walk($value); |
|
| 17 | } else { |
||
| 18 | 1 | $camelCased[$key] = $value; |
|
| 19 | } |
||
| 20 | 1 | }, array_keys($result)); |
|
| 21 | |||
| 22 | 1 | return $camelCased; |
|
| 23 | } |
||
| 34 |