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

MinElementNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
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 MinElementNotFoundException 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("Min 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