src/Nodes/NodeTrait.php
public function hasSingleChildBlockElement()
    {
        $result = false;
        if ($this->hasChildNodes()) {
            foreach ($this->getChildren() as $child) {
                if (in_array($child->nodeName, $this->divToPElements)) {
                    $result = true;
                } else {
                    // If any of the hasSingleChildBlockElement calls return true, return true then.
                    /** @var $child DOMElement */
                    $result = ($result || $child->hasSingleChildBlockElement());
                }
            }
        }

        return $result;
    }
public function hasSingleChildBlockElement()
    {
        $result = false;
        if ($this->hasChildNodes()) {
            foreach ($this->getChildren() as $child) {
                if (in_array($child->nodeName, $this->divToPElements)) {
                    $result = true;
                } else {
                    // If any of the hasSingleChildBlockElement calls return true, return true then.
                    /** @var $child DOMElement */
                    $result = ($result || $child->hasSingleChildBlockElement());
                }
            }
        }

        return $result;
    }
public function hasSingleChildBlockElement ( ) { $ result = false ; if ( $ this -> hasChildNodes ( ) ) { foreach ( $ this -> getChildren ( ) as $ child ) { if ( in_array ( $ child -> nodeName , $ this -> divToPElements ) ) { $ result = true ; } else { // If any of the hasSingleChildBlockElement calls return true, return true then. /** @var $child DOMElement */ $ result = ( $ result || $ child -> hasSingleChildBlockElement ( ) ) ; } } } return $ result ; }
Check if the current element has a single child block element.
Block elements are the ones defined in the divToPElements array.

@return bool
Check if the current element has a single child block element . Block elements are the ones defined in the divToPElements array .