Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
16 / 16 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
_MsgXData | |
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 | |
8 | declare(strict_types=1); |
9 | |
10 | namespace pvc\msg\err; |
11 | |
12 | use pvc\err\XDataAbstract; |
13 | |
14 | /** |
15 | * Class _MsgXData |
16 | * @noinspection PhpCSValidationInspection |
17 | */ |
18 | class _MsgXData extends XDataAbstract |
19 | { |
20 | public function getLocalXCodes(): array |
21 | { |
22 | return [ |
23 | NonExistentDomainCatalogFileException::class => 1001, |
24 | NonExistentDomainCatalogDirectoryException::class => 1002, |
25 | InvalidDomainCatalogFileException::class => 1004, |
26 | UnknownLoaderTypeException::class => 1006, |
27 | MissingLoaderConfigParameterException::class => 1007, |
28 | InvalidDomainException::class => 1008, |
29 | ]; |
30 | } |
31 | |
32 | public function getXMessageTemplates(): array |
33 | { |
34 | return [ |
35 | NonExistentDomainCatalogFileException::class => 'Domain catalog file ${filename} does not exist for locale ${locale} or the default \'en\'.', |
36 | NonExistentDomainCatalogDirectoryException::class => 'Domain catalog directory ${dirname} does not exist or is inaccessible.', |
37 | InvalidDomainCatalogFileException::class => 'Domain catalog file was not parseable into an array<string, string>.', |
38 | UnknownLoaderTypeException::class => 'Error trying to create unknown loaderFactory type ${badLoaderType}', |
39 | MissingLoaderConfigParameterException::class => 'Missing loaderFactory config parameter \'${missingParamName}\'', |
40 | InvalidDomainException::class => 'Error trying to get config for unknown domain ${invalidDomain}', |
41 | ]; |
42 | } |
43 | } |