Skip to content

Commit

Permalink
count
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Nov 12, 2022
1 parent 3fd129f commit 03f627b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/FileSystem/InitFilePathsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ public function resolve(string $projectDirectory): array
private function hasDirectoryFileInfoPhpFiles(SplFileInfo $rootDirectoryFileInfo): bool
{
// is directory with PHP files?
$phpFilesFinder = Finder::create()
$phpFilesCount = Finder::create()
->files()
->in($rootDirectoryFileInfo->getPathname())
->name('*.php');
->name('*.php')
->count();

return count($phpFilesFinder) !== 0;
return $phpFilesCount !== 0;
}
}

0 comments on commit 03f627b

Please sign in to comment.