Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
16 / 16 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
_FrmtrXData | |
100.00% |
16 / 16 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getLocalXCodes | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
getXMessageTemplates | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
5 | * @noinspection PhpCSValidationInspection |
6 | */ |
7 | declare(strict_types=1); |
8 | |
9 | namespace pvc\frmtr\err; |
10 | |
11 | use pvc\err\XDataAbstract; |
12 | |
13 | /** |
14 | * Class _FrmtrXData |
15 | */ |
16 | class _FrmtrXData extends XDataAbstract |
17 | { |
18 | |
19 | public function getLocalXCodes(): array |
20 | { |
21 | return [ |
22 | UnsetLocaleException::class => 1001, |
23 | InvalidMinMaxFractionalDigitException::class => 1002, |
24 | InvalidRoundingModeException::class => 1003, |
25 | InvalidIntlCalendarTypeException::class => 1004, |
26 | NonExistentMessageException::class => 1005, |
27 | MsgContentNotSetException::class => 1006, |
28 | ]; |
29 | } |
30 | |
31 | public function getXMessageTemplates(): array |
32 | { |
33 | return [ |
34 | UnsetLocaleException::class => 'Error trying to access uninitialized property \'locale\'', |
35 | InvalidMinMaxFractionalDigitException::class => 'min / max fractional digits must be greater than or equal to zero', |
36 | InvalidRoundingModeException::class => 'rounding mode must be set to one of the number formatter rounding constants e.g. NumberFormatter::ROUND_HALFUP', |
37 | InvalidIntlCalendarTypeException::class => 'Invalid calendar type, use one of the IntlDateFormatter constants.', |
38 | NonExistentMessageException::class => 'Catalog has no message that corresponds to msg id ${msgId}', |
39 | MsgContentNotSetException::class => 'Msg id not set', |
40 | ]; |
41 | } |
42 | } |