PDepend\Source\Language\PHP\PHPBuilder::getPreparedNamespaces PHP Method

getPreparedNamespaces() private method

Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
Since: 0.9.12
private getPreparedNamespaces ( ) : PDepend\Source\AST\ASTArtifactList
return PDepend\Source\AST\ASTArtifactList
    private function getPreparedNamespaces()
    {
        // Create a package array copy
        $namespaces = $this->namespaces;
        // Remove default package if empty
        if ($this->defaultPackage->getTypes()->count() === 0 && $this->defaultPackage->getFunctions()->count() === 0) {
            unset($namespaces[self::DEFAULT_NAMESPACE]);
        }
        return $namespaces;
    }
PHPBuilder