| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 3 | public function getTasks() |
|
| 26 | 3 | { |
|
| 27 | $commands = []; |
||
| 28 | $tasks = ClassInfo::subclassesFor(BuildTask::class); |
||
| 29 | 3 | ||
| 30 | // Remove the BuildTask itself |
||
| 31 | 3 | array_shift($tasks); |
|
| 32 | 3 | ||
| 33 | 3 | foreach ($tasks as $taskClass) { |
|
| 34 | if ($this->taskIsAbstract($taskClass)) { |
||
| 35 | continue; |
||
| 36 | 3 | } |
|
| 37 | |||
| 38 | $task = Injector::inst()->get($taskClass); |
||
| 39 | if ($command = $this->getCommandFactory()->getCommandFromTask($task)) { |
||
| 40 | $commands[] = $command; |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | 4 | return $commands; |
|
| 45 | } |
||
| 46 | 4 | ||
| 69 |