| Total Complexity | 3 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class FailedRollbackException extends RuntimeException implements FailedRollbackExceptionInterface |
||
| 15 | { |
||
| 16 | /** @var OperationInterface */ |
||
| 17 | private $operation; |
||
| 18 | |||
| 19 | /** @var OperationFailureInterface[] */ |
||
| 20 | private $previousRollbacks; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Constructor. |
||
| 24 | * |
||
| 25 | * @param OperationInterface $operation |
||
| 26 | * @param int $code |
||
| 27 | * @param Throwable $previous |
||
| 28 | * @param OperationFailureInterface ...$previousRollbacks |
||
| 29 | */ |
||
| 30 | 3 | public function __construct( |
|
| 46 | ); |
||
| 47 | 3 | } |
|
| 48 | |||
| 49 | /** |
||
| 50 | * Get the operation for which the rollback failed. |
||
| 51 | * |
||
| 52 | * @return OperationInterface |
||
| 53 | */ |
||
| 54 | 3 | public function getOperation(): OperationInterface |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the rollbacks that succeeded before the current failure. |
||
| 61 | * |
||
| 62 | * @return OperationFailureInterface[] |
||
| 63 | */ |
||
| 64 | 3 | public function getPreviousRollbacks(): array |
|
| 69 |