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

Breadcrumb

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

function ParserAbstract::checkClassConst

File

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

Class

ParserAbstract

Namespace

PhpParser

Code

protected function checkClassConst(ClassConst $node, int $modifierPos) : void {
    foreach ([
        Modifiers::STATIC,
        Modifiers::ABSTRACT,
        Modifiers::READONLY,
    ] as $modifier) {
        if ($node->flags & $modifier) {
            $this->emitError(new Error("Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier", $this->getAttributesAt($modifierPos)));
        }
    }
}

API Navigation

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