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

IndexMapMatchFailedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
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 8
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Remorhaz\JSON\Path\Runtime\Exception;
5
6
use LogicException;
7
use Remorhaz\JSON\Path\Value\ValueListInterface;
8
use Throwable;
9
10
final class IndexMapMatchFailedException extends LogicException implements ExceptionInterface
11
{
12
13
    private $leftValues;
14
15
    private $rightValues;
16
17 6
    public function __construct(
18
        ValueListInterface $leftValues,
19
        ValueListInterface $rightValues,
20
        Throwable $previous = null
21
    ) {
22 6
        $this->leftValues = $leftValues;
23 6
        $this->rightValues = $rightValues;
24 6
        parent::__construct("Index map match failed", 0, $previous);
25 6
    }
26
27 1
    public function getLeftValues(): ValueListInterface
28
    {
29 1
        return $this->leftValues;
30
    }
31
32 1
    public function getRightValues(): ValueListInterface
33
    {
34 1
        return $this->rightValues;
35
    }
36
}
37