| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5.0488 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 4 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 15 | { |
||
| 16 | try { |
||
| 17 | 4 | return $handler->handle($request); |
|
| 18 | 4 | } catch (Throwable $throwable) { |
|
| 19 | // continue; |
||
| 20 | } |
||
| 21 | |||
| 22 | 4 | if (!$this->isDevelopmentMode() && $throwable instanceof HttpException\HttpExceptionInterface) { |
|
| 23 | 4 | return $this->asJson($request) |
|
| 24 | 2 | ? $this->getJsonResponse($throwable) |
|
| 25 | 4 | : $this->getHtmlResponse($throwable); |
|
| 26 | } |
||
| 27 | |||
| 28 | throw $throwable; |
||
| 29 | } |
||
| 31 |