getNamespaceDefinition(); $content = $this->getFileContents(); if ($namespaceDefinition === null) { // global namespace -> strip namespace\ prefix return ResolvedName::buildName($this->getNameParts(), $content); } if ($namespaceDefinition->name instanceof QualifiedName) { $resolvedName = ResolvedName::buildName($namespaceDefinition->name->nameParts, $content); } else { $resolvedName = ResolvedName::buildName([], $content); } if ( !($this instanceof QualifiedName && ( ($this->parent instanceof NamespaceDefinition) || ($this->parent instanceof NamespaceUseDeclaration) || ($this->parent instanceof NamespaceUseClause) || ($this->parent instanceof NamespaceUseGroupClause))) ) { $resolvedName->addNameParts($this->getNameParts(), $content); } return $resolvedName; } }