PhpParser\ParserAbstract::checkUseUse PHP Method

checkUseUse() protected method

protected checkUseUse ( UseUse $node, $namePos )
$node PhpParser\Node\Stmt\UseUse
    protected function checkUseUse(UseUse $node, $namePos) {
        if ('self' == strtolower($node->alias) || 'parent' == strtolower($node->alias)) {
            $this->emitError(new Error(
                sprintf(
                    'Cannot use %s as %s because \'%2$s\' is a special class name',
                    $node->name, $node->alias
                ),
                $this->getAttributesAt($namePos)
            ));
        }
    }