MinElementNotFoundException   A
last analyzed

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