Total Complexity | 6 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
17 | 2 | final class ProdVndErrorPage extends ResourceObject |
|
18 | 2 | { |
|
19 | public function __construct(Throwable $e, RouterMatch $request) |
||
20 | 2 | { |
|
21 | unset($request); |
||
22 | 2 | $status = new Status($e); |
|
23 | $this->code = $status->code; |
||
24 | 2 | $this->headers = $this->getHeader($status->code); |
|
25 | $this->body = $this->getResponseBody($e, $status); |
||
26 | } |
||
27 | 2 | ||
28 | public function toString(): string |
||
33 | } |
||
34 | 2 | ||
35 | 2 | /** @return array<string, string> */ |
|
36 | 2 | private function getHeader(int $code): array |
|
39 | } |
||
40 | 2 | ||
41 | /** @return array<string, string> */ |
||
42 | private function getResponseBody(Throwable $e, Status $status): array |
||
50 | } |
||
51 | } |
||
52 |