Lines
50.00%
2 / 4
Methods
0.00%
0 / 1
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| withHtml | 50.00% | 2 / 4 | 0.00% | 0 / 1 | 2.50 | ||
| 8 | class TwigExceptionHandler extends \BO\Slim\TwigExceptionHandler | |
| 9 | { | |
| 10 | #[\Override] | |
| 11 | public static function withHtml( | |
| 12 | RequestInterface $request, | |
| 13 | ResponseInterface $response, | |
| 14 | \Throwable $exception, | |
| 15 | $status = 500 | |
| 16 | ): ResponseInterface { | |
| 17 | if ($exception instanceof \Slim\Exception\HttpNotFoundException) { | |
| 18 | \BO\Slim\Controller::prepareRequest($request); | |
| 19 | return \BO\Slim\Render::withHtml($response, 'page/404.twig'); | |
| 20 | } | |
| 21 | return parent::withHtml($request, $response, $exception, $status); | |
| 22 | } | |
| 23 | } |