Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
_CollectionXData
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getLocalXCodes
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
 getXMessageTemplates
100.00% covered (success)
100.00%
4 / 4
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            ComparatorException::class     => 1004,
27        ];
28    }
29
30    /**
31     * getXMessageTemplates
32     *
33     * @return string[]
34     */
35    public function getXMessageTemplates(): array
36    {
37        return [
38            DuplicateKeyException::class   => 'duplicate list key ${duplicateKey}',
39            ComparatorException::class     => 'cannot set a comparator on an indexed collection',
40        ];
41    }
42}