| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class SaferpayErrorException extends \Exception |
||
| 10 | { |
||
| 11 | /** @var ErrorResponse */ |
||
| 12 | private $errorResponse; |
||
| 13 | |||
| 14 | public function __construct(ErrorResponse $errorResponse) |
||
| 15 | { |
||
| 16 | $this->errorResponse = $errorResponse; |
||
| 17 | |||
| 18 | parent::__construct(sprintf( |
||
| 19 | '[%s] %s: %s', |
||
| 20 | $errorResponse->getBehaviour(), |
||
| 21 | $errorResponse->getErrorName(), |
||
| 22 | $errorResponse->getErrorMessage() |
||
| 23 | )); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getErrorResponse(): ?ErrorResponse |
||
| 29 | } |
||
| 30 | } |
||
| 31 |