Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 1 | public function getTasks() |
|
24 | { |
||
25 | 1 | $commands = []; |
|
26 | 1 | $tasks = ClassInfo::subclassesFor('SilverStripe\\Dev\\BuildTask'); |
|
27 | |||
28 | // Remove the BuildTask itself |
||
29 | 1 | array_shift($tasks); |
|
30 | |||
31 | 1 | foreach ($tasks as $taskClass) { |
|
32 | 1 | $task = Injector::inst()->get($taskClass); |
|
33 | 1 | $commands[] = $this->getCommandFactory()->getCommandFromTask($task); |
|
34 | } |
||
35 | |||
36 | 1 | return $commands; |
|
37 | } |
||
38 | |||
49 |