Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
18 | 3 | public function next(ServerRequestInterface $request) : ResponseInterface |
|
19 | { |
||
20 | 3 | if ($this->stack->count() === 0) { |
|
21 | 1 | throw new \RuntimeException('No more middleware\'s to call on.'); |
|
22 | } |
||
23 | |||
24 | /** @var HttpMiddlewareInterface $next */ |
||
25 | 3 | $next = $this->stack->pop(); |
|
26 | 3 | return $next->process($request, $this); |
|
27 | } |
||
28 | } |
||
29 |