File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public function initialize(array $filePaths): void
54
54
{
55
55
$ finderResult = $ this ->analyseFileFinder ->findFiles ($ this ->analysedPaths );
56
56
$ fileHashes = [];
57
- foreach (array_merge ($ finderResult ->getFiles (), $ filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles ())) as $ filePath ) {
57
+ foreach (array_unique ( array_merge ($ finderResult ->getFiles (), $ filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles () ))) as $ filePath ) {
58
58
$ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
59
59
}
60
60
@@ -73,7 +73,8 @@ public function getChanges(): FileMonitorResult
73
73
$ newFiles = [];
74
74
$ changedFiles = [];
75
75
$ deletedFiles = [];
76
- foreach (array_merge ($ finderResult ->getFiles (), $ this ->filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles ())) as $ filePath ) {
76
+ $ filePaths = array_unique (array_merge ($ finderResult ->getFiles (), $ this ->filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles ())));
77
+ foreach ($ filePaths as $ filePath ) {
77
78
if (!array_key_exists ($ filePath , $ oldFileHashes )) {
78
79
$ newFiles [] = $ filePath ;
79
80
$ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
You can’t perform that action at this time.
0 commit comments