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
4646{
4747$ finderResult = $ this ->analyseFileFinder ->findFiles ($ this ->analysedPaths );
4848$ 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 ) {
5050$ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
5151}
5252
@@ -65,7 +65,8 @@ public function getChanges(): FileMonitorResult
6565$ newFiles = [];
6666$ changedFiles = [];
6767$ 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 ) {
6970if (!array_key_exists ($ filePath , $ oldFileHashes )) {
7071$ newFiles [] = $ filePath ;
7172$ fileHashes [$ filePath ] = $ this ->getFileHash ($ filePath );
You can’t perform that action at this time.
0 commit comments