Total Complexity | 6 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
33 | class LanguageCzech extends AbstractModule implements ModuleLanguageInterface |
||
34 | { |
||
35 | use ModuleLanguageTrait; |
||
36 | |||
37 | /** |
||
38 | * Phone-book ordering of letters. |
||
39 | * |
||
40 | * @return array<int,string> |
||
41 | */ |
||
42 | public function alphabet(): array |
||
43 | { |
||
44 | 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', 'Ž']; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Some languages use digraphs and trigraphs. |
||
49 | * |
||
50 | * @param string $string |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function initialLetter(string $string): string |
||
55 | { |
||
56 | if (str_starts_with($string, 'CS')) { |
||
57 | return 'CS'; |
||
58 | } |
||
59 | |||
60 | return mb_substr($string, 0, 1); |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param string $column |
||
65 | * @param string $letter |
||
66 | * @param Builder $query |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | public function initialLetterSQL(string $column, string $letter, Builder $query): void |
||
76 | } |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * @return LocaleInterface |
||
81 | */ |
||
82 | public function locale(): LocaleInterface |
||
87 |