| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 20 | 2 | public static function map(string $path, ?Reader $reader = null): iterable |
|
| 21 | { |
||
| 22 | 2 | foreach (listClassesInDirectory($path) as $class) { |
|
| 23 | 2 | $handler = self::getHandlerByCommand($class, $reader); |
|
| 24 | |||
| 25 | 2 | if ($handler === null || !\class_exists($handler)) { |
|
| 26 | 2 | continue; |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | yield $class => $handler; |
|
| 30 | } |
||
| 31 | 2 | } |
|
| 32 | |||
| 44 |