Properly parenthesise arrow functions

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

View File

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