Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
12 / 12 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| _ValidatorXData | |
100.00% |
12 / 12 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| getLocalXCodes | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
1 | |||
| getXMessageTemplates | |
100.00% |
6 / 6 |
|
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\validator\err; |
| 10 | |
| 11 | use pvc\err\XDataAbstract; |
| 12 | |
| 13 | /** |
| 14 | * Class _ValidatorXData |
| 15 | */ |
| 16 | class _ValidatorXData extends XDataAbstract |
| 17 | { |
| 18 | |
| 19 | public function getLocalXCodes(): array |
| 20 | { |
| 21 | return [ |
| 22 | SetMinException::class => 1001, |
| 23 | SetMaxException::class => 1002, |
| 24 | InvalidLabelException::class => 1003, |
| 25 | InvalidMsgIdException::class => 1004, |
| 26 | ]; |
| 27 | } |
| 28 | |
| 29 | public function getXMessageTemplates(): array |
| 30 | { |
| 31 | return [ |
| 32 | SetMinException::class => 'min cannot be null and cannot set min value to be greater than existing max value.', |
| 33 | SetMaxException::class => 'max cannot be null and cannot set max value to be less than existing min value.', |
| 34 | InvalidLabelException::class => 'label cannot be an empty string', |
| 35 | InvalidMsgIdException::class => 'msgid ${msgId} not found in messages file / array', |
| 36 | ]; |
| 37 | } |
| 38 | } |