| Conditions | 5 |
| Paths | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function findInDirectory(string $directory): array |
||
| 20 | { |
||
| 21 | $models = []; |
||
| 22 | $iterator = Finder::create()->files()->name('*.php')->in($directory)->depth(0)->sortByName(); |
||
| 23 | |||
| 24 | foreach ($iterator as $file) { |
||
| 25 | $class = $this->determineClassFromFile($file); |
||
| 26 | if ($class !== null && class_exists($class) && $this->isModelClass($class)) { |
||
| 27 | $models[] = $class; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | return $models; |
||
| 32 | } |
||
| 73 |