Total Complexity | 6 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class DoctorTask extends Task |
||
14 | { |
||
15 | protected $taskStep = 's30'; |
||
16 | |||
17 | protected $param1 = ''; |
||
18 | |||
19 | protected $param2 = ''; |
||
20 | |||
21 | protected $rootDirForCommand = ''; |
||
22 | |||
23 | public function getTitle() |
||
24 | { |
||
25 | return 'Fix up .htaccess and index.html'; |
||
26 | } |
||
27 | |||
28 | public function getDescription() |
||
29 | { |
||
30 | return ' |
||
31 | Runs the silverstripe/upgrade task "doctor". See: |
||
32 | https://github.com/silverstripe/silverstripe-upgrader#doctor. |
||
33 | CAREFUL: will remove any customisations!'; |
||
34 | } |
||
35 | |||
36 | public function runActualTask($params = []) |
||
37 | { |
||
38 | if ($this->mu()->getIsModuleUpgrade()) { |
||
|
|||
39 | //do nothing ... |
||
40 | } else { |
||
41 | $this->runSilverstripeUpgradeTask( |
||
42 | 'doctor', |
||
43 | $this->param1, |
||
44 | $this->param2, |
||
45 | $this->rootDirForCommand |
||
46 | ); |
||
47 | $this->setCommitMessage('MAJOR: changing environment file(s)'); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | protected function hasCommitAndPush() |
||
57 | } |
||
58 | } |
||
59 |