| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class RemoteException extends RuntimeException |
||
| 11 | { |
||
| 12 | /** @var ResponseInterface */ |
||
| 13 | private $response; |
||
| 14 | |||
| 15 | 6 | public function __construct(ResponseInterface $response, ?string $message = null, Throwable $previous = null) |
|
| 16 | { |
||
| 17 | 6 | parent::__construct( |
|
| 18 | 6 | $message ?: $response->getReasonPhrase(), |
|
| 19 | 6 | $response->getStatusCode(), |
|
| 20 | $previous |
||
| 21 | ); |
||
| 22 | 6 | $this->response = $response; |
|
| 23 | 6 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @return ResponseInterface |
||
| 27 | */ |
||
| 28 | 2 | public function getResponse(): ResponseInterface |
|
| 31 | } |
||
| 32 | } |
||
| 33 |