Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
_FileXData
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getLocalXCodes
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
 getXMessageTemplates
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
5 * @noinspection PhpCSValidationInspection
6 */
7declare(strict_types=1);
8
9namespace pvc\file\err;
10
11use pvc\err\XDataAbstract;
12
13/**
14 * Class _FileXData
15 */
16class _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}