| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 33 | protected function buildExecutionChain() |
|
| 32 | { |
||
| 33 | 33 | $stack = $this->getMiddlewareStack(); |
|
| 34 | |||
| 35 | $next = function (ServerRequestInterface $request, ResponseInterface $response) { |
||
| 36 | 12 | return $response; |
|
| 37 | 33 | }; |
|
| 38 | |||
| 39 | 33 | foreach ($stack as $middleware) { |
|
| 40 | 33 | $next = function (ServerRequestInterface $request, ResponseInterface $response) use ($middleware, $next) { |
|
| 41 | 33 | return $middleware($request, $response, $next); |
|
| 42 | 33 | }; |
|
| 43 | 33 | } |
|
| 44 | |||
| 45 | 33 | return $next; |
|
| 46 | } |
||
| 47 | } |
||
| 48 |