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