Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function getRoutes() : Generator |
||
37 | { |
||
38 | $reflector = $this->reflectorFactory->create()->addDirectory(...$this->directories); |
||
39 | |||
40 | foreach ($reflector->reflect()->getClasses() as $class) { |
||
41 | foreach ($class->getMethods() as $method) { |
||
42 | foreach ($method->getAttributes(Route::class) as $attribute) { |
||
43 | /** @var Route $route */ |
||
44 | $route = $attribute->newInstance(); |
||
45 | |||
46 | yield new LoadedRoute($class->getName(), $method->getName(), $route); |
||
47 | } |
||
52 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..