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 */