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

Breadcrumb

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

function ParserAbstract::checkPropertyHook

File

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

Class

ParserAbstract

Namespace

PhpParser

Code

protected function checkPropertyHook(PropertyHook $hook, ?int $paramListPos) : void {
    $name = $hook->name
        ->toLowerString();
    if ($name !== 'get' && $name !== 'set') {
        $this->emitError(new Error('Unknown hook "' . $hook->name . '", expected "get" or "set"', $hook->name
            ->getAttributes()));
    }
    if ($name === 'get' && $paramListPos !== null) {
        $this->emitError(new Error('get hook must not have a parameter list', $this->getAttributesAt($paramListPos)));
    }
}

API Navigation

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