Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
28 | 3 | public function getMap(CharTree $charTree): array |
|
29 | { |
||
30 | 3 | $codeMap = []; |
|
31 | 3 | foreach ($this->charExtractor->apply($charTree) as $char) { |
|
32 | 1 | $lowerCase = mb_strtolower($char); |
|
33 | 1 | $upperCase = mb_strtoupper($char); |
|
34 | |||
35 | 1 | $codeMap[$char] = [$lowerCase]; |
|
36 | |||
37 | 1 | if ($lowerCase !== $upperCase) { |
|
38 | 1 | $codeMap[$char][] = $upperCase; |
|
39 | } |
||
40 | } |
||
41 | 3 | return $codeMap; |
|
42 | } |
||
52 |