Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class TestFailedException extends RuntimeException implements ExceptionInterface |
||
11 | { |
||
12 | |||
13 | private $index; |
||
14 | |||
15 | private $document; |
||
16 | |||
17 | private $path; |
||
18 | |||
19 | private $expectedValue; |
||
20 | |||
21 | public function __construct( |
||
22 | int $index, |
||
23 | NodeValueInterface $document, |
||
24 | string $path, |
||
25 | NodeValueInterface $expectedValue, |
||
26 | Throwable $previous = null |
||
27 | ) { |
||
28 | $this->index = $index; |
||
29 | $this->document = $document; |
||
30 | $this->path = $path; |
||
31 | $this->expectedValue = $expectedValue; |
||
32 | parent::__construct( |
||
33 | "Operation #{$this->index}: test operation failed at '{$path}'", |
||
34 | 0, |
||
35 | $previous |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | public function getIndex(): int |
||
40 | { |
||
41 | return $this->index; |
||
42 | } |
||
43 | |||
44 | public function getDocument(): NodeValueInterface |
||
45 | { |
||
46 | return $this->document; |
||
47 | } |
||
48 | |||
49 | public function getPath(): string |
||
52 | } |
||
53 | |||
54 | public function getExpectedValue(): NodeValueInterface |
||
57 | } |
||
58 | } |
||
59 |