Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 0 |
1 | <?php |
||
17 | 1 | class CamelCaseConverter implements IConverter |
|
18 | { |
||
19 | |||
20 | /** |
||
21 | * Converts resource data keys to camelCase |
||
22 | * @param array<TK, TVal> $resource |
||
23 | * @return array<TK, TVal> |
||
24 | */ |
||
25 | public function convert(array $resource): array |
||
26 | { |
||
27 | 1 | $this->convertToCamel($resource); |
|
28 | 1 | return $resource; |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * Convert array keys to camel case |
||
33 | * @param array<TK, TVal>|Traversable<TK, TVal> $array |
||
34 | */ |
||
35 | private function convertToCamel(iterable &$array): void |
||
51 | } |
||
52 | 1 | } |
|
54 |