function ParserAbstract::checkPropertyHook
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php, line 1171
Class
Namespace
PhpParserCode
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)));
}
}