Skip to content

Commit faccd12

Browse files
authored
Add comment for reset counter on visit new file
1 parent f684c1a commit faccd12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function refactor(Node $node): ?Ternary
5454
static $currentFile = null;
5555

5656
if ($currentFile !== $this->file->getFilePath()) {
57+
// the counter need start from 0 when visit new file to avoid random increment
58+
// accross files
59+
// due to run on parallel
5760
$this->counter = 0;
5861
$currentFile = $this->file->getFilePath();
5962
}

0 commit comments

Comments
 (0)