private function convertToText(Element $topNode): string {
        if (empty($topNode)) {
            return '';
        }

        $list = [];
        foreach ($topNode->contents() as $child) {
            $list[] = trim($child->text());
        }

        return implode("\n\n", $list);
    }
private function convertToText(Element $topNode): string {
        if (empty($topNode)) {
            return '';
        }

        $list = [];
        foreach ($topNode->contents() as $child) {
            $list[] = trim($child->text());
        }

        return implode("\n\n", $list);
    }
private function convertToText ( Element $ topNode ) : string { if ( empty ( $ topNode ) ) { return '' ; } $ list = [ ] ; foreach ( $ topNode -> contents ( ) as $ child ) { $ list [ ] = trim ( $ child -> text ( ) ) ; } return implode ( "\n\n" , $ list ) ; }
Takes an element and turns the P tags into \n\n

@param Element $topNode The top most node to format

@return string
Takes an element and turns the P tags into \ n \ n