From 2ae0b28ddb223f6ffbcd6592ca20bcac2b31aec9 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 12 Dec 2024 22:13:44 +0700 Subject: [PATCH] [DowngradePhp73] Fix complex next arg on DowngradeTrailingCommasInFunctionCallsRector --- .../FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php index 5afdfc3e..6ae6c2bd 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php @@ -94,6 +94,7 @@ public function refactor(Node $node): ?Node while (isset($tokens[$args[$lastArgKey]->getEndTokenPos() + $iteration])) { if (trim($tokens[$args[$lastArgKey]->getEndTokenPos() + $iteration]->text) === '') { + ++$iteration; continue; }