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 @@ -46,7 +46,7 @@ public function initialize(array $filePaths): void
46
46
{
47
47
$ finderResult = $ this ->analyseFileFinder ->findFiles ($ this ->analysedPaths );
48
48
$ fileHashes = [];
49
- foreach (array_merge ($ finderResult ->getFiles (), $ filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles ())) as $ filePath ) {
49
+ foreach (array_unique ( array_merge ($ finderResult ->getFiles (), $ filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles () ))) as $ filePath ) {
50
50
$ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
51
51
}
52
52
@@ -65,7 +65,8 @@ public function getChanges(): FileMonitorResult
65
65
$ newFiles = [];
66
66
$ changedFiles = [];
67
67
$ deletedFiles = [];
68
- foreach (array_merge ($ finderResult ->getFiles (), $ this ->filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles ())) as $ filePath ) {
68
+ $ filePaths = array_unique (array_merge ($ finderResult ->getFiles (), $ this ->filePaths , $ this ->getScannedFiles ($ finderResult ->getFiles ())));
69
+ foreach ($ filePaths as $ filePath ) {
69
70
if (!array_key_exists ($ filePath , $ oldFileHashes )) {
70
71
$ newFiles [] = $ filePath ;
71
72
$ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
You can’t perform that action at this time.
0 commit comments