| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 4 | public function handle(ServerRequestInterface $request): ResponseInterface |
|
| 33 | { |
||
| 34 | 4 | $handler = clone $this; |
|
| 35 | |||
| 36 | 4 | if (null === key($handler->middlewares)) { |
|
| 37 | 2 | return $this->responseFactory->createResponse(); |
|
| 38 | } |
||
| 39 | |||
| 40 | 3 | $middleware = current($handler->middlewares); |
|
| 41 | 3 | next($handler->middlewares); |
|
| 42 | |||
| 43 | 3 | return $middleware->process($request, $handler); |
|
| 44 | } |
||
| 45 | } |
||
| 46 |