Skip to content

Commit dc53812

Browse files
Merge pull request #4 from MaplePHP/develop
Recursive fix
2 parents 546e600 + f0d4a53 commit dc53812

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Unit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ private function findFiles($dir): array
147147
$files = [];
148148
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
149149
foreach ($iterator as $file) {
150-
if(isset($this->args['path']) || strpos($file->getPathname(), "vendor/") === false) {
150+
if (fnmatch(static::PATTERN, $file->getFilename()) &&
151+
(isset($this->args['path']) || strpos($file->getPathname(), "vendor/") === false)) {
151152
$files[] = $file->getPathname();
152153
}
153154
}

0 commit comments

Comments
 (0)