Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function __invoke( |
||
44 | ServerRequestInterface $request, |
||
45 | ResponseInterface $response, |
||
46 | callable $next |
||
47 | ) { |
||
48 | foreach ($this->mapping as $middleware => $attribute) { |
||
49 | $request = $request->withAttribute( |
||
50 | $attribute, |
||
51 | Middleware::getAttribute($request, $middleware) |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | return $next($request, $response); |
||
56 | } |
||
57 | } |