| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class ServiceUnavailableException extends \RuntimeException |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var RequestInterface |
||
| 14 | */ |
||
| 15 | protected $request; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | */ |
||
| 20 | protected $statusCode; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * ServiceUnavailableException constructor. |
||
| 24 | * |
||
| 25 | * @param RequestInterface $request |
||
| 26 | * @param string $message |
||
| 27 | * @param int $statusCode |
||
| 28 | */ |
||
| 29 | public function __construct(RequestInterface $request, string $message, int $statusCode = Response::HTTP_SERVICE_UNAVAILABLE) |
||
| 30 | { |
||
| 31 | $this->request = $request; |
||
| 32 | |||
| 33 | parent::__construct($message); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getRequest(): RequestInterface |
||
| 37 | { |
||
| 38 | return $this->request; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function getStatusCode(): int |
||
| 44 | } |
||
| 45 | } |