Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 22, 2025
1 parent 1b9ece0 commit da4cd52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpParser/Printer/BetterStandardPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ private function wrapBinaryOp(Node $node): void
}

if ($node->left instanceof BinaryOp && $node->left->getAttribute(AttributeKey::ORIGINAL_NODE) instanceof Node) {
$node->left->setAttribute(AttributeKey::WRAPPED_IN_PARENTHESES, true);
$node->left->setAttribute(AttributeKey::ORIGINAL_NODE, null);
}

if ($node->right instanceof BinaryOp && $node->right->getAttribute(AttributeKey::ORIGINAL_NODE) instanceof Node) {
$node->right->setAttribute(AttributeKey::WRAPPED_IN_PARENTHESES, true);
$node->right->setAttribute(AttributeKey::ORIGINAL_NODE, null);
}
}

Expand Down

0 comments on commit da4cd52

Please sign in to comment.