Passed
Push — master ( 9e63b9...2051c8 )
by Edward
05:00
created

MaxElementNotFoundException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
c 1
b 0
f 1
dl 0
loc 30
ccs 9
cts 9
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataList() 0 3 1
A __construct() 0 5 1
A getElements() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Remorhaz\JSON\Path\Runtime\Aggregator\Exception;
5
6
use LogicException;
7
use Remorhaz\JSON\Data\Value\ScalarValueInterface;
8
use Throwable;
9
10
final class MaxElementNotFoundException extends LogicException implements ExceptionInterface
11
{
12
13
    private $dataList;
14
15
    private $elements;
16
17
    /**
18
     * @param array $dataList
19
     * @param ScalarValueInterface[] $elements
20
     * @param Throwable|null $previous
21
     */
22 6
    public function __construct(array $dataList, array $elements, Throwable $previous = null)
23
    {
24 6
        $this->dataList = $dataList;
25 6
        $this->elements = $elements;
26 6
        parent::__construct("Max element not found", 0, $previous);
27 6
    }
28
29 1
    public function getDataList(): array
30
    {
31 1
        return $this->dataList;
32
    }
33
34
    /**
35
     * @return ScalarValueInterface[]
36
     */
37 1
    public function getElements(): array
38
    {
39 1
        return $this->elements;
40
    }
41
}
42