| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 2 | private function getCommandsFromFinder(): array |
|
| 44 | { |
||
| 45 | 2 | $commands = []; |
|
| 46 | 2 | foreach ($this->commandFinder->getCommandClasses() as $file) { |
|
| 47 | 2 | require_once $file->getRealPath(); |
|
| 48 | |||
| 49 | 2 | $className = sprintf( |
|
| 50 | 2 | 'Nexus\\CustomCommand\\Command\\%s', |
|
| 51 | 2 | $file->getBasename('.php') |
|
| 52 | ); |
||
| 53 | 2 | $commands[] = new $className(); |
|
| 54 | } |
||
| 55 | 2 | return $commands; |
|
| 56 | } |
||
| 59 | } |