Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
48 | 27 | protected function callMiddleware($class, $excludeMiddleware, $last) |
|
49 | { |
||
50 | // Build middleware from back to front |
||
51 | 27 | $next = $last; |
|
52 | |||
53 | /** @var Middleware $middleware */ |
||
54 | 27 | foreach (array_reverse($this->getMiddlewares()) as $middleware) { |
|
55 | 4 | $next = function ($class, $excludeMiddleware) use ($middleware, $next) { |
|
56 | 4 | return $middleware->getClassConfig($class, $excludeMiddleware, $next); |
|
57 | 4 | }; |
|
58 | 27 | } |
|
59 | 27 | return $next($class, $excludeMiddleware); |
|
60 | } |
||
61 | } |
||
62 |