Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class GuardErrorException extends RuntimeException |
||
17 | { |
||
18 | /** |
||
19 | * @var ResponseInterface |
||
20 | */ |
||
21 | private $response; |
||
22 | |||
23 | 3 | public static function with(ResponseInterface $response): self |
|
24 | { |
||
25 | 3 | $self = new self( |
|
26 | 3 | 'A guard has an error detected.', |
|
27 | 3 | $response->getStatusCode() |
|
28 | ); |
||
29 | 3 | $self->response = $response; |
|
30 | 3 | return $self; |
|
31 | } |
||
32 | |||
33 | public function getResponse(): ResponseInterface |
||
36 | } |
||
37 | } |
||
38 |