Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
23 | trait AssertCultureTrait |
||
24 | { |
||
25 | /** |
||
26 | * Validate culture |
||
27 | * |
||
28 | * @param string $value |
||
29 | * @param string $message |
||
30 | * |
||
31 | * @return null |
||
32 | * @throws \TxTextControl\ReportingCloud\Exception\InvalidArgumentException |
||
33 | */ |
||
34 | 12 | public static function assertCulture(string $value, string $message = '') |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Return the filename, containing cultures array |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | 12 | public static function getCulturesFilename(): string |
|
49 | { |
||
50 | 12 | $filename = __DIR__ . '/../../data/cultures.php'; |
|
51 | 12 | $filename = realpath($filename); |
|
52 | |||
53 | 12 | return $filename; |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * Return cultures array |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | 12 | private static function getCultures(): array |
|
66 | } |
||
67 | } |
||
68 |