Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 21, 2025
1 parent ce9ecf6 commit 6b459ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpParser/Printer/BetterStandardPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ protected function pInfixOp(string $class, Node $leftNode, string $operatorStrin
* @see https://github.com/rectorphp/rector-src/pull/6668
* @see https://github.com/rectorphp/rector/issues/8980
*/
if ($leftNode instanceof Assign && $rightNode->getStartTokenPos() < 0) {
if ($leftNode instanceof Assign && $leftNode->getStartTokenPos() > 0 && $rightNode->getStartTokenPos() < 0) {
$leftNode->setAttribute(AttributeKey::WRAPPED_IN_PARENTHESES, true);
}

Expand Down

0 comments on commit 6b459ba

Please sign in to comment.