It seems like $objects can also be of type false; however, parameter $array of reset() does only seem to accept array, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
26
\reset(/** @scrutinizer ignore-type */ $objects);
Loading history...
27
28
1
return \rmdir($directory);
29
}
30
31
1
return false;
32
}
33
34
1
private function removeSubDirectoriesAndFiles($object, string $directory): void