src/Dom/DOMDocument.php
private function ensureNodeClass(DOMNode $node)
    {
        $class = $this->nodeClasses['DOMElement'];

        if (true !== ($node instanceof $class) && $node instanceof \DOMElement) {
            return $node->ownerDocument->importNode($node, true);
        }

        return $node;
    }
private function ensureNodeClass(DOMNode $node)
    {
        $class = $this->nodeClasses['DOMElement'];

        if (true !== ($node instanceof $class) && $node instanceof \DOMElement) {
            return $node->ownerDocument->importNode($node, true);
        }

        return $node;
    }
private function ensureNodeClass ( DOMNode $ node ) { $ class = $ this -> nodeClasses [ 'DOMElement' ] ; if ( true !== ( $ node instanceof $ class ) && $ node instanceof \ DOMElement ) { return $ node -> ownerDocument -> importNode ( $ node , true ) ; } return $ node ; }
Workarround for hhvm issue

@see https://github.com/facebook/hhvm/issues/1848

@param DOMNode $node

@return DOMNode
Workarround for hhvm issue