From faccd122a07d313ccc248337dca7002c4d311417 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 20 Dec 2025 23:19:42 +0700 Subject: [PATCH 1/3] Add comment for reset counter on visit new file --- .../DowngradeNullsafeToTernaryOperatorRector.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index b3cb7e90..cb7c73b8 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -54,6 +54,9 @@ public function refactor(Node $node): ?Ternary static $currentFile = null; if ($currentFile !== $this->file->getFilePath()) { + // the counter need start from 0 when visit new file to avoid random increment + // accross files + // due to run on parallel $this->counter = 0; $currentFile = $this->file->getFilePath(); } From fd68b67d6d01a50bb83f1efe5e92d1273e4587bc Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 20 Dec 2025 16:20:59 +0000 Subject: [PATCH 2/3] [ci-review] Rector Rectify --- .../DowngradeNullsafeToTernaryOperatorRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index cb7c73b8..05e4d4cf 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -54,7 +54,7 @@ public function refactor(Node $node): ?Ternary static $currentFile = null; if ($currentFile !== $this->file->getFilePath()) { - // the counter need start from 0 when visit new file to avoid random increment + // the counter need start from 0 when visit new file to avoid random increment // accross files // due to run on parallel $this->counter = 0; From 9a00e0ecd3ce607167a321eb3297dfdd3967078f Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 20 Dec 2025 23:22:47 +0700 Subject: [PATCH 3/3] typo fix --- .../DowngradeNullsafeToTernaryOperatorRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index 05e4d4cf..39362d51 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -55,7 +55,7 @@ public function refactor(Node $node): ?Ternary if ($currentFile !== $this->file->getFilePath()) { // the counter need start from 0 when visit new file to avoid random increment - // accross files + // across files // due to run on parallel $this->counter = 0; $currentFile = $this->file->getFilePath();