Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 1 | private function removeSubDirectoriesAndFiles($object, string $directory): void |
|
35 | { |
||
36 | 1 | if ($object !== '.' && $object !== '..') { |
|
37 | |||
38 | 1 | $currentDirectory = $this->createDirectoryPath([$directory, $object]); |
|
39 | |||
40 | 1 | if (filetype($currentDirectory) === 'dir') { |
|
41 | 1 | $this->execute($currentDirectory); |
|
42 | } else { |
||
43 | 1 | \unlink($currentDirectory); |
|
44 | } |
||
53 |