| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function __invoke(ServerRequestInterface $request):ResponseInterface |
||
| 40 | { |
||
| 41 | $middleware = $this->middleware; |
||
| 42 | $finalHandler = $this->finalHandler; |
||
| 43 | $current = $middleware($request); |
||
| 44 | |||
| 45 | while ($current->valid()) { |
||
| 46 | $nextRequest = $current->current(); |
||
| 47 | |||
| 48 | try { |
||
| 49 | $nextResponse = $finalHandler($nextRequest); |
||
| 50 | $current->send($nextResponse); |
||
| 51 | } catch (Throwable $exception) { |
||
|
|
|||
| 52 | $current->throw($exception); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | return $current->getReturn(); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |