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

Breadcrumb

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

function ParserAbstract::checkNamespace

File

vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php, line 1057

Class

ParserAbstract

Namespace

PhpParser

Code

protected function checkNamespace(Namespace_ $node) : void {
    if (null !== $node->stmts) {
        foreach ($node->stmts as $stmt) {
            if ($stmt instanceof Namespace_) {
                $this->emitError(new Error('Namespace declarations cannot be nested', $stmt->getAttributes()));
            }
        }
    }
}

API Navigation

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