| Conditions | 4 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function getRoutes(ReflectionClass $class): array |
||
| 30 | { |
||
| 31 | $addRoutes = []; |
||
| 32 | $removeRoutes = []; |
||
| 33 | |||
| 34 | foreach ( |
||
| 35 | $this->getClassAnnotations( |
||
| 36 | $class, |
||
| 37 | RouteAnnotationInterface::class |
||
| 38 | ) as $annotation |
||
| 39 | ) { |
||
| 40 | if ($annotation instanceof AddRoute) { |
||
| 41 | $addRoutes[$annotation->name] = $annotation; |
||
| 42 | continue; |
||
| 43 | } |
||
| 44 | |||
| 45 | if ($annotation instanceof RemoveRoute) { |
||
| 46 | $removeRoutes[$annotation->name] = $annotation; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | return [$addRoutes, $removeRoutes]; |
||
| 51 | } |
||
| 54 |