Add tools/ to PHPStan analysis

This commit is contained in:
Dylan K. Taylor
2021-08-29 23:31:24 +01:00
parent 6bbc0aae7d
commit ee8b854f30
3 changed files with 15 additions and 7 deletions

View File

@ -59,7 +59,11 @@ const SUPPORTED_EXTENSIONS = [
* @phpstan-param array<string, int> $files
*/
function find_regions_recursive(string $dir, array &$files) : void{
foreach(scandir($dir, SCANDIR_SORT_NONE) as $file){
$dirFiles = scandir($dir, SCANDIR_SORT_NONE);
if($dirFiles === false){
return;
}
foreach($dirFiles as $file){
if($file === "." or $file === ".."){
continue;
}