| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | public function getSuits(string $folder): array { |
||
| 16 | $suits = []; |
||
| 17 | $finder = new Finder(); |
||
| 18 | $iterator = new ClassIterator($finder->in($folder)); |
||
| 19 | $iterator->enableAutoloading(); |
||
| 20 | /** @var ReflectionClass $class */ |
||
| 21 | foreach($iterator->type(TestCase::class) as $class) { |
||
| 22 | $filename = (string) $class->getFileName(); |
||
| 23 | if(!$class->isInstantiable() || !str_ends_with($filename, "Test.php")) { |
||
| 24 | continue; |
||
| 25 | } |
||
| 26 | $suits[] = [$class->getName(), $filename]; |
||
| 27 | } |
||
| 28 | return $suits; |
||
| 29 | } |
||
| 31 | ?> |