Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
50 | 31 | private static function convertNames(array $data): array |
|
51 | { |
||
52 | 31 | $result = []; |
|
53 | |||
54 | 31 | foreach ($data as $key => $value) { |
|
55 | 27 | $parts = explode('_', $key); |
|
56 | 27 | foreach ($parts as &$part) { |
|
57 | 27 | $part = ucfirst($part); |
|
58 | } |
||
59 | 27 | $key = implode("", $parts); |
|
60 | 27 | $key = lcfirst($key); |
|
61 | 27 | $result[$key] = $value; |
|
62 | } |
||
63 | |||
64 | 31 | return $result; |
|
65 | } |
||
83 |