WebrootUpdate::getDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Sunnysideup\UpgradeToSilverstripe4\Tasks\IndividualTasks;
4
5
use Sunnysideup\UpgradeToSilverstripe4\Tasks\Task;
6
7
/**
8
 * This task runs the silverstripe upgrade task 'webroot' to configure
9
 * your project to use the public web root structure
10
 */
11
class WebrootUpdate extends Task
12
{
13
    protected $param1 = '';
14
15
    protected $param2 = '';
16
17
    protected $rootDirForCommand = '';
18
19
    protected $settings = '';
20
21
    public function getTitle()
22
    {
23
        return 'Fix Folder Case';
24
    }
25
26
    public function getDescription()
27
    {
28
        return '
29
            Runs the silverstripe/upgrade task "webroot". See:
30
            https://github.com/silverstripe/silverstripe-upgrader#webroot.
31
            Configure your project to use the public web root structure
32
            introduced with SilverStripe 4.1';
33
    }
34
35
    public function runActualTask($params = []): ?string
36
    {
37
        $this->runSilverstripeUpgradeTask(
38
            'webroot',
39
            $this->param1,
40
            $this->param2,
41
            $this->rootDirForCommand,
42
            $this->settings
43
        );
44
        $this->setCommitMessage('API:  adding webroot concept');
45
        return null;
46
    }
47
48
    public function hasCommitAndPush()
49
    {
50
        return true;
51
    }
52
}
53