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

Breadcrumb

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

function Standard::pStmt_Namespace

File

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

Class

Standard

Namespace

PhpParser\PrettyPrinter

Code

protected function pStmt_Namespace(Stmt\Namespace_ $node) : string {
    if ($this->canUseSemicolonNamespaces) {
        return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, false);
    }
    else {
        return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
    }
}

API Navigation

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