Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class UnknownOperationException extends Exception |
||
10 | { |
||
11 | /** @var OpPath|object */ |
||
12 | private $operation; |
||
13 | |||
14 | /** |
||
15 | * @param OpPath|object $operation |
||
16 | * @param int $code |
||
17 | * @param Throwable|null $previous |
||
18 | */ |
||
19 | public function __construct( |
||
20 | $operation, |
||
21 | $code = 0, |
||
22 | ?Throwable $previous = null |
||
23 | ) |
||
24 | { |
||
25 | // @phpstan-ignore-next-line MissingFieldOperation will be thrown if op is not set |
||
26 | parent::__construct('Unknown "op": ' . $operation->op, $code, $previous); |
||
27 | $this->operation = $operation; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return OpPath|object |
||
32 | */ |
||
33 | public function getOperation() |
||
36 | } |
||
37 | } |
||
38 |