Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
14 / 14 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| _FileXData | |
100.00% |
14 / 14 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| getLocalXCodes | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 | |||
| getXMessageTemplates | |
100.00% |
7 / 7 |
|
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\file\err; |
| 10 | |
| 11 | use pvc\err\XDataAbstract; |
| 12 | |
| 13 | /** |
| 14 | * Class _FileXData |
| 15 | */ |
| 16 | class _FileXData extends XDataAbstract |
| 17 | { |
| 18 | |
| 19 | public function getLocalXCodes(): array |
| 20 | { |
| 21 | return [ |
| 22 | DirectoryDoesNotExistException::class => 1001, |
| 23 | DirectoryDoesNotExistException::class => 1002, |
| 24 | ScanDirException::class => 1003, |
| 25 | InvalidSortOrderException::class => 1004, |
| 26 | FileTreeNotEmptyException::class => 1005, |
| 27 | ]; |
| 28 | } |
| 29 | |
| 30 | public function getXMessageTemplates(): array |
| 31 | { |
| 32 | return [ |
| 33 | DirectoryDoesNotExistException::class => '${filePath} is not a valid directory name', |
| 34 | DirectoryDoesNotExistException::class => '${filePath} exists but cannot be read - most likely a permissions problem.', |
| 35 | ScanDirException::class => 'Unknown filesystem exception trying to get a file handle for ${filePath} using opendir', |
| 36 | InvalidSortOrderException::class => 'Invalid sort order specified - must be a class constant from FileSearch class', |
| 37 | FileTreeNotEmptyException::class => 'error trying to hydrate file treeId - treeId is not empty', |
| 38 | ]; |
| 39 | } |
| 40 | } |