Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
18 / 18 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
_IntlXData | |
100.00% |
18 / 18 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getLocalXCodes | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
1 | |||
getXMessageTemplates | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
5 | * @noinspection PhpCSValidationInspection |
6 | */ |
7 | |
8 | declare (strict_types=1); |
9 | |
10 | namespace pvc\intl\err; |
11 | |
12 | use pvc\err\XDataAbstract; |
13 | |
14 | /** |
15 | * Class _HtmlXData |
16 | */ |
17 | class _IntlXData extends XDataAbstract |
18 | { |
19 | |
20 | public function getLocalXCodes(): array |
21 | { |
22 | return [ |
23 | InvalidLocaleException::class => 1000, |
24 | InvalidTimezoneException::class => 1001, |
25 | InvalidCountryCodeException::class => 1002, |
26 | InvalidLanguageCodeException::class => 1003, |
27 | InvalidCharsetException::class => 1004, |
28 | InvalidDateTimeTypeException::class => 1005, |
29 | InvalidCalendarTypeException::class => 1006, |
30 | ]; |
31 | } |
32 | |
33 | public function getXMessageTemplates(): array |
34 | { |
35 | return [ |
36 | InvalidLocaleException::class => 'Invalid locale string: ${locale}', |
37 | InvalidTimezoneException::class => 'Invalid timezone: ${badTimezone}', |
38 | InvalidCountryCodeException::class => 'Invalid country code: ${badCountryCode}', |
39 | InvalidLanguageCodeException::class => 'Invalid language code: ${badLanguageCode}', |
40 | InvalidCharsetException::class => 'Invalid charset: ${badCharset}', |
41 | InvalidDateTimeTypeException::class => 'Invalid Date Type / Time Type - see the IntlDateFormatter documentation', |
42 | InvalidCalendarTypeException::class => 'Invalid calendar type - see the IntlDateFormatter documentation', |
43 | ]; |
44 | } |
45 | } |