| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class ResetWebRootDir extends Task |
||
| 12 | { |
||
| 13 | protected $taskStep = 's00'; |
||
| 14 | |||
| 15 | public function getTitle() |
||
| 16 | { |
||
| 17 | return 'Remove and reset the web root'; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getDescription() |
||
| 23 | Delete the web root directory to allow for a fresh install.'; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function runActualTask($params = []): ?string |
||
| 27 | { |
||
| 28 | FileSystemFixes::inst($this->mu()) |
||
| 29 | ->removeDirOrFile($this->mu()->getWebRootDirLocation(), $this->mu()->getAboveWebRootDirLocation()); |
||
| 30 | FileSystemFixes::inst($this->mu()) |
||
| 31 | ->mkDir($this->mu()->getWebRootDirLocation(), $this->mu()->getAboveWebRootDirLocation()); |
||
| 32 | return null; |
||
| 33 | } |
||
| 34 | |||
| 35 | protected function hasCommitAndPush() |
||
| 38 | } |
||
| 39 | } |
||
| 40 |