Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
33 | function remove_directories_and_files_in_directory($object, string $directory): void |
||
34 | { |
||
35 | 1 | if ($object !== '.' && $object !== '..') { |
|
36 | |||
37 | 1 | $currentDirectory = create_directory_path([$directory, $object]); |
|
38 | |||
39 | 1 | if (filetype($currentDirectory) === 'dir') { |
|
40 | 1 | rrmdir($currentDirectory); |
|
41 | } else { |
||
42 | 1 | unlink($currentDirectory); |
|
43 | } |
||
51 |