| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 60 | 6 | public function generate(Throwable $error, ServerRequestInterface $request): ResponseInterface |
|
| 61 | { |
||
| 62 | 6 | $response = $this->responseFactory->createResponse($this->extractErrorStatusCode($error)); |
|
| 63 | |||
| 64 | 6 | $response->getBody()->write($this->template->render($this->view, [ |
|
| 65 | 6 | 'response' => $response, |
|
| 66 | 6 | 'request' => $request, |
|
| 67 | 6 | 'exception' => $error, |
|
| 68 | 6 | 'debug' => $this->debug, |
|
| 69 | 6 | ])); |
|
| 70 | |||
| 71 | 6 | return $response; |
|
| 72 | } |
||
| 74 |