| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 3 | private function createExecutionChain(array $middlewareList): Closure |
|
| 38 | { |
||
| 39 | 3 | $lastCallable = static fn () => null; |
|
| 40 | |||
| 41 | 3 | while ($middleware = array_pop($middlewareList)) { |
|
| 42 | 2 | $lastCallable = static fn (object $command) => $middleware->execute($command, $lastCallable); |
|
| 43 | } |
||
| 44 | |||
| 45 | 3 | return $lastCallable; |
|
| 46 | } |
||
| 48 |