| Total Complexity | 6 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 84.62% |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 13 | class ErrorResponse extends AbstractApiResponse |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var \Exception |
||
| 17 | */ |
||
| 18 | private $exception; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $message; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * ErrorResponse constructor. |
||
| 27 | * @param ResponseInterface $response |
||
| 28 | * @param ClientRequestInterface $request |
||
| 29 | * @param \Exception $exception |
||
| 30 | * @param Context $context |
||
| 31 | */ |
||
| 32 | 16 | public function __construct( |
|
| 33 | \Exception $exception, |
||
| 34 | ClientRequestInterface $request, |
||
| 35 | ResponseInterface $response, |
||
| 36 | Context $context = null |
||
| 37 | ) { |
||
| 38 | 16 | parent::__construct($response, $request, $context); |
|
| 39 | 16 | $this->exception = $exception; |
|
| 40 | 16 | } |
|
| 41 | |||
| 42 | 11 | public function isError() |
|
| 45 | } |
||
| 46 | |||
| 47 | 2 | public function getMessage() |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return \Exception |
||
| 58 | */ |
||
| 59 | public function getException() |
||
| 64 |