8000 [Printer] Remove unnecessary BetterStandardPrinter::pParam() override… · rectorphp/rector-src@b5e2b49 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5e2b49

Browse files
[Printer] Remove unnecessary BetterStandardPrinter::pParam() override method (#6947)
* [Printer] Remove unnecessary BetterStandardPrinter::pParam() override method * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent 66a7ba8 commit b5e2b49

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use PhpParser\Node\Expr\Ternary;
2323
use PhpParser\Node\Expr\Yield_;
2424
use PhpParser\Node\InterpolatedStringPart;
25-
use PhpParser\Node\Param;
2625
use PhpParser\Node\Scalar\Float_;
2726
use PhpParser\Node\Scalar\Int_;
2827
use PhpParser\Node\Scalar\InterpolatedString;
@@ -430,21 +429,6 @@ protected function pExpr_MethodCall(MethodCall $methodCall): string
430429
. '(' . $this->pMaybeMultiline($methodCall->args) . ')';
431430
}
432431

433-
/**
434-
* Keep attributes on newlines
435-
*/
436-
protected function pParam(Param $param): string
437-
{
438-
return $this->pAttrGroups($param->attrGroups)
439-
. $this->pModifiers($param->flags)
440-
. ($param->type instanceof Node ? $this->p($param->type) . ' ' : '')
441-
. ($param->byRef ? '&' : '')
442-
6883 . ($param->variadic ? '...' : '')
443-
. $this->p($param->var)
444-
. ($param->default instanceof Expr ? ' = ' . $this->p($param->default) : '')
445-
. ($param->hooks !== [] ? ' {' . $this->pStmts($param->hooks) . $this->nl . '}' : '');
446-
}
447-
448432
protected function pInfixOp(
449433
string $class,
450434
Node $leftNode,

0 commit comments

Comments
 (0)
0