| Total Complexity | 6 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Exception extends \Exception implements HttpExceptionInterface |
||
| 11 | { |
||
| 12 | 81 | public function __construct( |
|
| 13 | protected int $status, |
||
| 14 | protected $message = '', |
||
| 15 | ?\Exception $previous = null, |
||
| 16 | protected array $headers = [], |
||
| 17 | int $code = 0 |
||
| 18 | ) { |
||
| 19 | 81 | parent::__construct($this->message, $code, $previous); |
|
| 20 | } |
||
| 21 | |||
| 22 | 54 | public function getStatusCode(): int |
|
| 23 | { |
||
| 24 | 54 | return $this->status; |
|
| 25 | } |
||
| 26 | |||
| 27 | 3 | public function getHeaders(): array |
|
| 28 | { |
||
| 29 | 3 | return $this->headers; |
|
| 30 | } |
||
| 31 | |||
| 32 | 63 | public function buildJsonResponse(ResponseInterface $response): ResponseInterface |
|
| 49 | } |
||
| 50 | } |
||
| 51 |