Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
39 | 6 | final protected static function normalize(array $options) : array |
|
40 | { |
||
41 | 6 | $normalizedOptions = []; |
|
42 | |||
43 | 6 | foreach ($options as $key => $value) { |
|
44 | 5 | $normalizedKey = str_replace(' ', '', ucwords(str_replace(['_', '-'], ' ', $key))); |
|
45 | 5 | $normalizedKey[0] = strtolower($normalizedKey[0]); |
|
46 | |||
47 | 5 | $normalizedOptions[$normalizedKey] = $value; |
|
48 | } |
||
49 | |||
50 | 6 | return $normalizedOptions; |
|
51 | } |
||
52 | |||
67 |