Automattic\WooCommerce\Vendor\Pelago\Emogrifier

CssInliner::ensureNodeIsElementprivateWC 1.0

Method of the class: CssInliner{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->ensureNodeIsElement( $node ): \DOMElement;
$node(DOMNode) (required)
.

CssInliner::ensureNodeIsElement() code WC 10.8.1

private function ensureNodeIsElement(\DOMNode $node): \DOMElement
{
    if (!$node instanceof \DOMElement) {
        $path = $node->getNodePath() ?? '$node';
        throw new \UnexpectedValueException($path . ' is not a DOMElement.', 1617975914);
    }

    return $node;
}