From e0b9cb22b4a9368def55ee100d938194387e29a2 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 29 Oct 2026 16:04:44 +0700 Subject: [PATCH] [Printer] Remove BetterStandardPrinter::pExpr_Ternary() method --- src/PhpParser/Printer/BetterStandardPrinter.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/PhpParser/Printer/BetterStandardPrinter.php b/src/PhpParser/Printer/BetterStandardPrinter.php index 6d551d83da4..4b4921c335e 100644 --- a/src/PhpParser/Printer/BetterStandardPrinter.php +++ b/src/PhpParser/Printer/BetterStandardPrinter.php @@ -411,17 +411,6 @@ protected function pStmt_Declare(Declare_ $declare): string return Strings::replace($declareString, '#\s+#'); } - protected function pExpr_Ternary(Ternary $ternary, int $precedence, int $lhsPrecedence): string - { - $kind = $ternary->getAttribute(AttributeKey::KIND); - if ($kind === AttributeKey::WRAPPED_IN_PARENTHESES) { - $pExprTernary = parent::pExpr_Ternary($ternary, $precedence, $lhsPrecedence); - return '(' . $pExprTernary . ')'; - } - - return parent::pExpr_Ternary($ternary, $precedence, $lhsPrecedence); - } - /** * Used in rector-downgrade-php */