| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 23 | private function clearDirectory($path) |
||
| 24 | { |
||
| 25 | $files = scandir($path); |
||
| 26 | array_shift($files); |
||
| 27 | array_shift($files); |
||
| 28 | |||
| 29 | foreach ($files as $file) { |
||
| 30 | $file = $path.DIRECTORY_SEPARATOR.$file; |
||
| 31 | if (is_dir($file)) { |
||
| 32 | $this->clearDirectory($file); |
||
| 33 | } else { |
||
| 34 | unlink($file); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | rmdir($path); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |