Conditions | 4 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function processRoute(RouteInterface $route): RouteInterface |
||
14 | { |
||
15 | if ($annotation = $route->getAnnotation(Pipe::CLASS)) { |
||
|
|||
16 | foreach ((array)$annotation->middlewares as $middleware) { |
||
17 | $route = $route->withMiddleware($middleware); |
||
18 | } |
||
19 | |||
20 | foreach ((array)$annotation->attributes as $key => $value) { |
||
21 | $route = $route->withAttribute($key, $value); |
||
22 | } |
||
23 | } |
||
24 | |||
25 | return $route; |
||
26 | } |
||
28 |