private function getCssFromAllStyleNodes(\DOMXPath $xPath)
    {
        $styleNodes = $xPath->query('//style');

        if ($styleNodes === false) {
            return '';
        }

        $css = '';
        /** @var \DOMNode $styleNode */
        foreach ($styleNodes as $styleNode) {
            $css .= "\n\n" . $styleNode->nodeValue;
            $styleNode->parentNode->removeChild($styleNode);
        }

        return $css;
    }
private function getCssFromAllStyleNodes(\DOMXPath $xPath)
    {
        $styleNodes = $xPath->query('//style');

        if ($styleNodes === false) {
            return '';
        }

        $css = '';
        /** @var \DOMNode $styleNode */
        foreach ($styleNodes as $styleNode) {
            $css .= "\n\n" . $styleNode->nodeValue;
            $styleNode->parentNode->removeChild($styleNode);
        }

        return $css;
    }
private function getCssFromAllStyleNodes ( \ DOMXPath $ xPath ) { $ styleNodes = $ xPath -> query ( '//style' ) ; if ( $ styleNodes === false ) { return '' ; } $ css = '' ; /** @var \DOMNode $styleNode */ foreach ( $ styleNodes as $ styleNode ) { $ css .= "\n\n" . $ styleNode -> nodeValue ; $ styleNode -> parentNode -> removeChild ( $ styleNode ) ; } return $ css ; }
Returns CSS content.

@param \DOMXPath $xPath

@return string
Returns CSS content .