Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class MissingFieldException extends Exception |
||
9 | { |
||
10 | /** @var string */ |
||
11 | private $missingField; |
||
12 | /** @var OpPath|object */ |
||
13 | private $operation; |
||
14 | |||
15 | /** |
||
16 | * @param string $missingField |
||
17 | * @param OpPath|object $operation |
||
18 | * @param int $code |
||
19 | * @param Throwable|null $previous |
||
20 | */ |
||
21 | public function __construct( |
||
22 | $missingField, |
||
23 | $operation, |
||
24 | $code = 0, |
||
25 | ?Throwable $previous = null |
||
26 | ) |
||
27 | { |
||
28 | parent::__construct('Missing "' . $missingField . '" in operation data', $code, $previous); |
||
29 | $this->missingField = $missingField; |
||
30 | $this->operation = $operation; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return string |
||
35 | */ |
||
36 | public function getMissingField() |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return OpPath|object |
||
43 | */ |
||
44 | public function getOperation() |
||
49 |