Conditions | 5 |
Paths | 9 |
Total Lines | 23 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | private function findClassesInPaths($searchPaths) |
||
40 | { |
||
41 | $finder = new Finder(); |
||
42 | $includedFiles = array(); |
||
43 | foreach ($searchPaths as $path) { |
||
44 | foreach ($finder->files()->name('*.php')->in($path) as $file) { |
||
45 | require_once $file->getRealpath(); |
||
46 | $includedFiles[] = $file->getRealpath(); |
||
47 | } |
||
48 | } |
||
49 | |||
50 | $declared = get_declared_classes(); |
||
51 | |||
52 | $classes = array(); |
||
53 | foreach ($declared as $className) { |
||
54 | $reflection = new \ReflectionClass($className); |
||
55 | if (in_array($reflection->getFileName(), $includedFiles)) { |
||
56 | $classes[] = $className; |
||
57 | } |
||
58 | } |
||
59 | |||
60 | return $classes; |
||
61 | } |
||
62 | } |
||
63 |