| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function handle() |
||
| 25 | { |
||
| 26 | if (is_dir($this->rootDirectory)) { |
||
| 27 | exec('rm -rf '.$this->rootDirectory); |
||
| 28 | } |
||
| 29 | |||
| 30 | mkdir($this->rootDirectory, 0777, true); |
||
| 31 | |||
| 32 | if (!is_dir($this->rootDirectory)) { |
||
| 33 | // If we failed to create directory, all |
||
| 34 | // other steps can't be executed, so |
||
| 35 | // just return false to stop task. |
||
| 36 | |||
| 37 | return false; |
||
| 38 | } |
||
| 39 | |||
| 40 | return true; |
||
| 41 | } |
||
| 43 |