PhpParser\ParserAbstract::checkInterface PHP Method

checkInterface() protected method

protected checkInterface ( Interface_ $node, $namePos )
$node PhpParser\Node\Stmt\Interface_
    protected function checkInterface(Interface_ $node, $namePos) {
        if (null !== $node->name && isset(self::$specialNames[strtolower($node->name)])) {
            $this->emitError(new Error(
                sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name),
                $this->getAttributesAt($namePos)
            ));
        }

        foreach ($node->extends as $interface) {
            if (isset(self::$specialNames[strtolower($interface)])) {
                $this->emitError(new Error(
                    sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface),
                    $interface->getAttributes()
                ));
            }
        }
    }