Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class CreatePublicFolder extends Task |
||
13 | { |
||
14 | protected $taskStep = 's10'; |
||
15 | |||
16 | protected $publicFolderName = 'public'; |
||
17 | |||
18 | public function getTitle() |
||
21 | } |
||
22 | |||
23 | public function getDescription() |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * [runActualTask description] |
||
31 | * @param array $params not currently used for this task |
||
32 | */ |
||
33 | public function runActualTask($params = []): ?string |
||
34 | { |
||
35 | if ($this->mu()->getIsProjectUpgrade()) { |
||
36 | $newFolder = $this->mu()->getWebRootDirLocation() . '/' . $this->publicFolderName; |
||
37 | FileSystemFixes::inst($this->mu()) |
||
38 | ->mkDir($newFolder); |
||
39 | |||
40 | $this->mu()->execMe( |
||
41 | $newFolder, |
||
42 | 'echo \'hello world\' >> hello-world.html', |
||
43 | 'adding public test file', |
||
44 | false |
||
45 | ); |
||
46 | } |
||
47 | return null; |
||
48 | } |
||
49 | |||
50 | protected function hasCommitAndPush() |
||
53 | } |
||
54 | } |
||
55 |