| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function getRoutes(\ReflectionClass $class): array |
||
| 18 | { |
||
| 19 | $addRoutes = []; |
||
| 20 | $removeRoutes = []; |
||
| 21 | |||
| 22 | foreach ($this->getClassAnnotations($class) as $annotation) { |
||
| 23 | if ($annotation instanceof AddRoute) { |
||
| 24 | $addRoutes[$annotation->getName()] = $annotation; |
||
| 25 | continue; |
||
| 26 | } |
||
| 27 | |||
| 28 | if ($annotation instanceof RemoveRoute) { |
||
| 29 | $removeRoutes[$annotation->getName()] = $annotation; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | return [$addRoutes, $removeRoutes]; |
||
| 34 | } |
||
| 36 |