| Total Complexity | 3 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class MalformedResponseException extends InvalidRequestException |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var ResponseInterface |
||
| 15 | */ |
||
| 16 | private $response; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Creates a new MalformedResponseException instance. |
||
| 20 | * |
||
| 21 | * @param string $message |
||
| 22 | * The exception message. |
||
| 23 | * @param \Exception|null $previous |
||
| 24 | * The previous exception. |
||
| 25 | * @param int $code |
||
| 26 | * The exception code. |
||
| 27 | * @param \Psr\Http\Message\ResponseInterface|null $response |
||
| 28 | * The response. |
||
| 29 | */ |
||
| 30 | 3 | public function __construct( |
|
| 31 | $message = "", |
||
| 32 | \Exception $previous = null, |
||
| 33 | $code = 0, |
||
| 34 | ResponseInterface $response = null |
||
| 35 | ) { |
||
| 36 | 3 | parent::__construct($message, $code, $previous); |
|
| 37 | 3 | $this->response = $response; |
|
| 38 | 3 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Returns the response. |
||
| 42 | * |
||
| 43 | * @return ResponseInterface |
||
| 44 | */ |
||
| 45 | 3 | public function getResponse() |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Sets the response. |
||
| 52 | * |
||
| 53 | * @param ResponseInterface $response |
||
| 54 | */ |
||
| 55 | public function setResponse($response) |
||
| 58 | } |
||
| 59 | } |
||
| 60 |