private function areMultipleNamespacesInFile()
    {
        if (count($this->objects) === 0) {
            return false;
        }

        $foundNamespaces = array();
        foreach ($this->objects as $object) {
            $ns = $object->getNamespace();
            if ($ns !== null) {
                $foundNamespaces[$ns] = $ns;
            }
        }

        $foundNamespacesCount = count($foundNamespaces);

        if ($foundNamespacesCount === 0) {
            return false;
        } elseif ($foundNamespacesCount > 1) {
            return true;
        } else {
            return !isset($foundNamespaces[$this->getNamespace()]);
        }
    }