| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class ServerResponseException extends \Exception |
||
| 18 | { |
||
| 19 | /** @var ServerResponse The server response. */ |
||
| 20 | private $serverResponse; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Contract a server response exception with the gieven server response. |
||
| 24 | * |
||
| 25 | * @param ServerResponse $serverResponse |
||
| 26 | * @param \Exception|null $exception = null |
||
| 27 | */ |
||
| 28 | 2 | public function __construct(ServerResponse $serverResponse, \Exception $exception = null) |
|
| 29 | { |
||
| 30 | 2 | parent::__construct($serverResponse->getReasonPhrase(), $serverResponse->getStatusCode(), $exception); |
|
| 31 | |||
| 32 | 2 | $this->serverResponse = $serverResponse; |
|
| 33 | 2 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Returns the server response. |
||
| 37 | * |
||
| 38 | * @return ServerResponse the server response. |
||
| 39 | */ |
||
| 40 | 1 | public function getServerResponse() |
|
| 43 | } |
||
| 44 | } |
||
| 45 |