| Conditions | 4 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function processRoute(RouteInterface $route): RouteInterface |
||
| 15 | { |
||
| 16 | if ($operation = $route->getAnnotation(Operation::CLASS)) { |
||
|
|
|||
| 17 | $route = $route |
||
| 18 | ->withRoutable(true) |
||
| 19 | ->withHttpMethod($operation->method); |
||
| 20 | |||
| 21 | if ($operation->path != UNDEFINED) { |
||
| 22 | $route = $route->withPath($operation->path); |
||
| 23 | } |
||
| 24 | |||
| 25 | if ($operation->operationId != UNDEFINED) { |
||
| 26 | $route = $route->withName($operation->operationId); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | return $route; |
||
| 31 | } |
||
| 33 |