Passed
Branch master (2f7647)
by Nicolaas
04:56 queued 03:20
created

FinalDevBuild::runActualTask()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Sunnysideup\UpgradeToSilverstripe4\Tasks\IndividualTasks;
4
5
use Sunnysideup\UpgradeToSilverstripe4\Tasks\Task;
6
7
/**
8
 * Run a dev/build as a smoke test to see if all is well
9
 */
10
class FinalDevBuild extends Task
11
{
12
    protected $taskStep = 's60';
13
14
    public function getTitle()
15
    {
16
        return 'Run dev/build';
17
    }
18
19
    public function getDescription()
20
    {
21
        return '
22
            Run a dev/build as a smoke test to see if all is well.';
23
    }
24
25
    public function runActualTask($params = [])
26
    {
27
        $this->mu()->execMe(
28
            $this->mu()->getWebRootDirLocation(),
0 ignored issues
show
Bug introduced by
The method getWebRootDirLocation() does not exist on Sunnysideup\UpgradeToSilverstripe4\ModuleUpgrader. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
            $this->mu()->/** @scrutinizer ignore-call */ getWebRootDirLocation(),
Loading history...
29
            'vendor/bin/sake dev/build flush=all',
30
            'It is time for a dev/build',
31
            false
32
        );
33
    }
34
35
    protected function hasCommitAndPush()
36
    {
37
        return false;
38
    }
39
}
40