private function addBodyElementIfMissing(): bool
    {
        if ($this->getElementsByTagName('body')->length === 0) {
            if (!isset(self::$newObjectsCache['bodyelement'])) {
                self::$newObjectsCache['bodyelement'] = new \DOMElement('body');
            }
            $this->getElementsByTagName('html')->item(0)->appendChild(clone(self::$newObjectsCache['bodyelement']));
            return true;
        }
        return false;
    }
private function addBodyElementIfMissing(): bool
    {
        if ($this->getElementsByTagName('body')->length === 0) {
            if (!isset(self::$newObjectsCache['bodyelement'])) {
                self::$newObjectsCache['bodyelement'] = new \DOMElement('body');
            }
            $this->getElementsByTagName('html')->item(0)->appendChild(clone(self::$newObjectsCache['bodyelement']));
            return true;
        }
        return false;
    }
private function addBodyElementIfMissing ( ) : bool { if ( $ this -> getElementsByTagName ( 'body' ) -> length === 0 ) { if ( ! isset ( self :: $ newObjectsCache [ 'bodyelement' ] ) ) { self :: $ newObjectsCache [ 'bodyelement' ] = new \ DOMElement ( 'body' ) ; } $ this -> getElementsByTagName ( 'html' ) -> item ( 0 ) -> appendChild ( clone ( self :: $ newObjectsCache [ 'bodyelement' ] ) ) ; return true ; } return false ; }
Adds the BODY tag to the document if missing.

@return boolean TRUE on success, FALSE otherwise.
Adds the BODY tag to the document if missing .