Skip to content

Commit 7491260

Browse files
committed
FileFinder - make list of found files unique
1 parent 18a6723 commit 7491260

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/File/FileFinder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Symfony\Component\Finder\Finder;
66
use function array_filter;
7+
use function array_unique;
78
use function array_values;
89
use function file_exists;
910
use function implode;
@@ -45,7 +46,7 @@ public function findFiles(array $paths): FileFinderResult
4546
}
4647
}
4748

48-
$files = array_values(array_filter($files, fn (string $file): bool => !$this->fileExcluder->isExcludedFromAnalysing($file)));
49+
$files = array_values(array_unique(array_filter($files, fn (string $file): bool => !$this->fileExcluder->isExcludedFromAnalysing($file))));
4950

5051
return new FileFinderResult($files, $onlyFiles);
5152
}

0 commit comments

Comments
 (0)