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); |
||
19 | 3 | public function next(RequestInterface $request) : ResponseInterface |
|
20 | { |
||
21 | 3 | if ($this->stack->count() === 0) { |
|
22 | 1 | throw new \RuntimeException('No more middleware\'s to call on.'); |
|
23 | } |
||
24 | |||
25 | /** @var HttpMiddlewareInterface $next */ |
||
26 | 3 | $next = $this->stack->pop(); |
|
27 | 3 | return $next->process($request, $this); |
|
28 | } |
||
29 | } |
||
30 |