| Total Complexity | 6 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | class LanguageCzech extends AbstractModule implements ModuleLanguageInterface |
||
| 33 | { |
||
| 34 | use ModuleLanguageTrait; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Phone-book ordering of letters. |
||
| 38 | * |
||
| 39 | * @return array<int,string> |
||
| 40 | */ |
||
| 41 | public function alphabet(): array |
||
| 42 | { |
||
| 43 | return ['A', 'Á', 'B', 'C', 'Č', 'D', 'Ď', 'E', 'É', 'Ě', 'F', 'G', 'H', 'CH', 'I', 'Í', 'J', 'K', 'L', 'M', 'N', 'Ň', 'O', 'Ó', 'P', 'Q', 'R', 'Ř', 'S', 'Š', 'T', 'Ť', 'U', 'Ú', 'Ů', 'V', 'W', 'X', 'Y', 'Ý', 'Z', 'Ž']; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Some languages use digraphs and trigraphs. |
||
| 48 | * |
||
| 49 | * @param string $string |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function initialLetter(string $string): string |
||
| 54 | { |
||
| 55 | if (str_starts_with($string, 'CS')) { |
||
| 56 | return 'CS'; |
||
| 57 | } |
||
| 58 | |||
| 59 | return mb_substr($string, 0, 1); |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $column |
||
| 64 | * @param string $letter |
||
| 65 | * @param Builder $query |
||
| 66 | * |
||
| 67 | * @return void |
||
| 68 | */ |
||
| 69 | public function initialLetterSQL(string $column, string $letter, Builder $query): void |
||
| 75 | } |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @return LocaleInterface |
||
| 80 | */ |
||
| 81 | public function locale(): LocaleInterface |
||
| 86 |