Conditions | 4 |
Paths | 6 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function __invoke(string $path): \Iterator |
||
21 | { |
||
22 | $directoriesSourceLocator = new DirectoriesSourceLocator([$path]); |
||
23 | |||
24 | $classReflector = new ClassReflector($directoriesSourceLocator); |
||
25 | |||
26 | foreach($classReflector->getAllClasses() as $class) { |
||
27 | $methods = $class->getImmediateMethods(); |
||
28 | |||
29 | foreach ($methods as $method) { |
||
30 | yield from ReturnTypeHint::method($method); |
||
31 | yield from InputTypeHint::method($method); |
||
32 | } |
||
33 | } |
||
34 | |||
35 | $functionReflector = new FunctionReflector($directoriesSourceLocator); |
||
36 | |||
37 | foreach ($functionReflector->getAllFunctions() as $function) { |
||
38 | yield from ReturnTypeHint::function($function); |
||
39 | yield from InputTypeHint::function($function); |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 |