private function cleanupHtml(): string {
        $topNode = $this->article()->getTopNode();

        if (empty($topNode)) {
            return '';
        }

        $this->removeParagraphsWithFewWords($topNode);

        $html = $this->convertToHtml($topNode);

        return str_replace(['<p></p>', '<p>&nbsp;</p>'], '', $html);
    }
private function cleanupHtml(): string {
        $topNode = $this->article()->getTopNode();

        if (empty($topNode)) {
            return '';
        }

        $this->removeParagraphsWithFewWords($topNode);

        $html = $this->convertToHtml($topNode);

        return str_replace(['<p></p>', '<p>&nbsp;</p>'], '', $html);
    }
private function cleanupHtml ( ) : string { $ topNode = $ this -> article ( ) -> getTopNode ( ) ; if ( empty ( $ topNode ) ) { return '' ; } $ this -> removeParagraphsWithFewWords ( $ topNode ) ; $ html = $ this -> convertToHtml ( $ topNode ) ; return str_replace ( [ '<p></p>' , '<p>&nbsp;</p>' ] , '' , $ html ) ; }
Scrape the node content and return the html

@return string Formatted string with all HTML
Scrape the node content and return the html