| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | 2 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 28 | { |
||
| 29 | try { |
||
| 30 | 2 | return $handler->handle($request); |
|
| 31 | 1 | } catch (Throwable $exception) { |
|
| 32 | 1 | $message = json_encode([ |
|
| 33 | 1 | 'message' => $exception->getMessage(), |
|
| 34 | 1 | 'code' => $exception->getCode(), |
|
| 35 | 1 | 'file' => $exception->getFile(), |
|
| 36 | 1 | 'line' => $exception->getLine() |
|
| 37 | ]); |
||
| 38 | 1 | $this->logger->error( |
|
| 39 | 1 | $message |
|
| 40 | 1 | ? $message |
|
| 41 | 1 | : sprintf(self::UNEXPECTED_EXCEPTION_MESSAGE, get_class($exception)) |
|
| 42 | ); |
||
| 43 | |||
| 44 | 1 | throw $exception; |
|
| 45 | } |
||
| 48 |