| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function getClassMap(string $directory, string $namePattern = '*.php'): array |
||
| 19 | { |
||
| 20 | $result = []; |
||
| 21 | $finder = new Finder(); |
||
| 22 | $finder->in($directory)->files()->name($namePattern); |
||
| 23 | $iterator = new ClassIterator($finder); |
||
| 24 | foreach ($iterator->getClassMap() as $class => $splFileInfo) { |
||
| 25 | $result[$splFileInfo->getRealPath()] = $class; |
||
| 26 | } |
||
| 27 | return $result; |
||
| 28 | } |
||
| 30 |