Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
50 | { |
||
51 | if ($this->queue->valid()) { |
||
52 | 2 | $middleware = $this->queue->current(); |
|
53 | 2 | $this->queue->next(); |
|
54 | |||
55 | 2 | return $middleware->process($request, $this); |
|
56 | } |
||
57 | |||
58 | if ($this->fallback) { |
||
59 | 2 | return $this->fallback->handle($request); |
|
60 | } |
||
61 | |||
62 | 2 | return $this->queue->response(); |
|
63 | } |
||
65 |