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

Breadcrumb

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

function Standard::pExpr_New

File

vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php, line 701

Class

Standard

Namespace

PhpParser\PrettyPrinter

Code

protected function pExpr_New(Expr\New_ $node) : string {
    if ($node->class instanceof Stmt\Class_) {
        $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : '';
        return 'new ' . $this->pClassCommon($node->class, $args);
    }
    return 'new ' . $this->pNewOperand($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')';
}

API Navigation

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