| Conditions | 5 |
| Paths | 5 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 18 | public function __construct(bool $encode = false) |
|
| 44 | { |
||
| 45 | 18 | if ($encode) { |
|
| 46 | 9 | foreach (self::ENCODE_MAP as $char => $codedChars) { |
|
| 47 | 9 | $this->codeMap[mb_strlen($char)][mb_strtoupper($char)] = $codedChars; |
|
| 48 | } |
||
| 49 | } else { |
||
| 50 | 9 | foreach (self::ENCODE_MAP as $char => $codedChars) { |
|
| 51 | 9 | foreach ($codedChars as $codedChar) { |
|
| 52 | 9 | $this->codeMap[mb_strlen($codedChar)][mb_strtoupper($codedChar)][] = $char; |
|
| 53 | } |
||
| 80 |