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

Breadcrumb

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

function Standard::pExpr_Array

File

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

Class

Standard

Namespace

PhpParser\PrettyPrinter

Code

protected function pExpr_Array(Expr\Array_ $node) : string {
    $syntax = $node->getAttribute('kind', $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG);
    if ($syntax === Expr\Array_::KIND_SHORT) {
        return '[' . $this->pMaybeMultiline($node->items, true) . ']';
    }
    else {
        return 'array(' . $this->pMaybeMultiline($node->items, true) . ')';
    }
}

API Navigation

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