Skip to content

Commit 7640420

Browse files
Add comment for reset counter on visit new file (#357)
* Add comment for reset counter on visit new file * [ci-review] Rector Rectify * typo fix --------- Co-authored-by: GitHub Action <[email protected]>
1 parent f684c1a commit 7640420

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+
// across files
59+
// due to run on parallel
5760
$this->counter = 0;
5861
$currentFile = $this->file->getFilePath();
5962
}

0 commit comments

Comments
 (0)