Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | 2 | public function getRoutes(): Generator |
|
38 | { |
||
39 | 2 | $reflector = $this->reflectorFactory->create()->addDirectory(...$this->directories); |
|
40 | |||
41 | 2 | foreach ($reflector->reflect()->getClasses() as $class) { |
|
42 | 2 | foreach ($class->getMethods() as $method) { |
|
43 | 2 | foreach ($method->getAttributes(Route::class) as $attribute) { |
|
44 | /** @var Route $route */ |
||
45 | 2 | $route = $attribute->newInstance(); |
|
46 | |||
47 | 2 | yield new LoadedRoute($class->getName(), $method->getName(), $route); |
|
48 | } |
||
53 |
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..