Lines
100.00%
2 / 2
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 2 | ||
| getStatus | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 10 | class HttpException extends RuntimeException | |
| 11 | { | |
| 12 | public function __construct( | |
| 13 | private readonly HttpStatus $status, | |
| 14 | string $message = "", | |
| 15 | ?\Throwable $previous = null | |
| 16 | ) { | |
| 17 | parent::__construct($message ?: $status->message(), 0, $previous); | |
| 18 | } | |
| 19 | ||
| 20 | public function getStatus(): HttpStatus | |
| 21 | { | |
| 22 | return $this->status; | |
| 23 | } | |
| 24 | } |