Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7491260

Browse files
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)

AltStyle によって変換されたページ (->オリジナル) /