Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class OperationFailure implements OperationFailureInterface |
||
12 | { |
||
13 | /** @var OperationInterface */ |
||
14 | private $operation; |
||
15 | |||
16 | /** @var Throwable|null */ |
||
17 | private $exception; |
||
18 | |||
19 | /** |
||
20 | * Constructor. |
||
21 | * |
||
22 | * @param OperationInterface $operation |
||
23 | * @param Throwable|null $exception |
||
24 | */ |
||
25 | 2 | public function __construct( |
|
31 | 2 | } |
|
32 | |||
33 | /** |
||
34 | * Get the failed operation. |
||
35 | * |
||
36 | * @return OperationInterface |
||
37 | */ |
||
38 | 2 | public function getOperation(): OperationInterface |
|
39 | { |
||
40 | 2 | return $this->operation; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Get the exception that caused the operation to fail. |
||
45 | * |
||
46 | * @return Throwable|null |
||
47 | */ |
||
48 | 2 | public function getException(): ?Throwable |
|
51 | } |
||
52 | } |
||
53 |