src/Rector/Namespace_/RenameNamespaceRector.php
private function isClassFullyQualifiedName(Node $node): bool
    {
        $parentNode = $node->getAttribute(AttributeKey::PARENT_NODE);
        if ($parentNode === null) {
            return false;
        }

        if (! $parentNode instanceof New_) {
            return false;
        }

        /** @var FullyQualified $fullyQualifiedNode */
        $fullyQualifiedNode = $parentNode->class;

        $newClassName = $fullyQualifiedNode->toString();

        return array_key_exists($newClassName, $this->oldToNewNamespaces);
    }
private function isClassFullyQualifiedName(Node $node): bool
    {
        $parentNode = $node->getAttribute(AttributeKey::PARENT_NODE);
        if ($parentNode === null) {
            return false;
        }

        if (! $parentNode instanceof New_) {
            return false;
        }

        /** @var FullyQualified $fullyQualifiedNode */
        $fullyQualifiedNode = $parentNode->class;

        $newClassName = $fullyQualifiedNode->toString();

        return array_key_exists($newClassName, $this->oldToNewNamespaces);
    }
private function isClassFullyQualifiedName ( Node $ node ) : bool { $ parentNode = $ node -> getAttribute ( AttributeKey :: PARENT_NODE ) ; if ( $ parentNode === null ) { return false ; } if ( ! $ parentNode instanceof New_ ) { return false ; } /** @var FullyQualified $fullyQualifiedNode */ $ fullyQualifiedNode = $ parentNode -> class ; $ newClassName = $ fullyQualifiedNode -> toString ( ) ; return array_key_exists ( $ newClassName , $ this -> oldToNewNamespaces ) ; }
Checks for "new \ClassNoNamespace;"
This should be skipped, not a namespace.
Checks for new \ ClassNoNamespace ; This should be skipped not a namespace .