Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PrettyPrinterAbstract.php

function PrettyPrinterAbstract::callLhsRequiresParens

Determines whether the LHS of a call must be wrapped in parenthesis.

Parameters

Node $node LHS of a call:

Return value

bool Whether parentheses are required

2 calls to PrettyPrinterAbstract::callLhsRequiresParens()
PrettyPrinterAbstract::pFixup in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
Print node with fixups.
Standard::pCallLhs in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php

File

vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php, line 1144

Class

PrettyPrinterAbstract

Namespace

PhpParser

Code

protected function callLhsRequiresParens(Node $node) : bool {
    return !($node instanceof Node\Name || $node instanceof Expr\Variable || $node instanceof Expr\ArrayDimFetch || $node instanceof Expr\FuncCall || $node instanceof Expr\MethodCall || $node instanceof Expr\NullsafeMethodCall || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal