function PrettyPrinterAbstract::dereferenceLhsRequiresParens
Determines whether the LHS of an array/object operation must be wrapped in parentheses.
Parameters
Node $node LHS of dereferencing operation:
Return value
bool Whether parentheses are required
2 calls to PrettyPrinterAbstract::dereferenceLhsRequiresParens()
- PrettyPrinterAbstract::pFixup in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php - Print node with fixups.
- Standard::pDereferenceLhs in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinter/ Standard.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php, line 1162
Class
Namespace
PhpParserCode
protected function dereferenceLhsRequiresParens(Node $node) : bool {
// A constant can occur on the LHS of an array/object deref, but not a static deref.
return $this->staticDereferenceLhsRequiresParens($node) && !$node instanceof Expr\ConstFetch;
}