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