From 549f620ab16512800fad2146a8e007a1466c7325 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 12 Dec 2024 22:17:29 +0700 Subject: [PATCH] fix phsptan --- .../DowngradeTrailingCommasInFunctionCallsRector.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php index 6ae6c2bd..d1f2daf6 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php @@ -102,12 +102,8 @@ public function refactor(Node $node): ?Node break; } - if (trim($tokens[$args[$lastArgKey]->getEndTokenPos() + $iteration]->text) === ',') { - $tokens[$args[$lastArgKey]->getEndTokenPos() + $iteration]->text = ''; - break; - } - - ++$iteration; + $tokens[$args[$lastArgKey]->getEndTokenPos() + $iteration]->text = ''; + break; } return $node;