Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
_CollectionXData
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getLocalXCodes
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
 getXMessageTemplates
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
5 * @noinspection PhpCSValidationInspection
6 */
7
8declare(strict_types=1);
9
10namespace pvc\struct\collection\err;
11
12
13use pvc\err\XDataAbstract;
14
15class _CollectionXData extends XDataAbstract
16{
17    /**
18     * getLocalXCodes
19     *
20     * @return int[]
21     */
22    public function getLocalXCodes(): array
23    {
24        return [
25            DuplicateKeyException::class   => 1001,
26            InvalidKeyException::class     => 1002,
27            NonExistentKeyException::class => 1003,
28            InvalidComparatorException::class => 1004,
29        ];
30    }
31
32    /**
33     * getXMessageTemplates
34     *
35     * @return string[]
36     */
37    public function getXMessageTemplates(): array
38    {
39        return [
40            DuplicateKeyException::class   => 'duplicate list key ${duplicateKey}',
41            InvalidKeyException::class     => 'Invalid list key ${invalidKey} - must be integer >= 0',
42            NonExistentKeyException::class => 'non-existent list key ${nonExistentKey}',
43            InvalidComparatorException::class => 'cannot set a value comparator on a collection where the ordered flag is set to true',
44        ];
45    }
46}