function ParserAbstract::checkClassName
3 calls to ParserAbstract::checkClassName()
- ParserAbstract::checkClass in vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php - ParserAbstract::checkEnum in vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php - ParserAbstract::checkInterface in vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php, line 1069
Class
Namespace
PhpParserCode
private function checkClassName(?Identifier $name, int $namePos) : void {
if (null !== $name && $name->isSpecialClassName()) {
$this->emitError(new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $name), $this->getAttributesAt($namePos)));
}
}