1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-26 20:04:48 +01:00

Properly parenthesise arrow functions

This commit is contained in:
Daniil Gentili 2021-01-09 18:36:41 +01:00
parent 9407d9a4b9
commit a9282514c8
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -638,7 +638,7 @@ class Standard extends PrettyPrinterAbstract
. '(' . $this->pCommaSeparated($node->params) . ')' . '(' . $this->pCommaSeparated($node->params) . ')'
. (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '')
. ' => ' . ' => '
. $this->p($node->expr); . $this->pDereferenceLhs($node->expr);
} }
protected function pExpr_ClosureUse(Expr\ClosureUse $node) { protected function pExpr_ClosureUse(Expr\ClosureUse $node) {