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
5454 {
5555 $ finderResult = $ this ->analyseFileFinder ->findFiles ($ this ->analysedPaths );
5656 $ 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 ) {
5858 $ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
5959 }
6060
@@ -73,7 +73,8 @@ public function getChanges(): FileMonitorResult
7373 $ newFiles = [];
7474 $ changedFiles = [];
7575 $ 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 ) {
7778 if (!array_key_exists ($ filePath , $ oldFileHashes )) {
7879 $ newFiles [] = $ filePath ;
7980 $ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
You can’t perform that action at this time.
0 commit comments