private function getSiblingContent(Element $currentSibling, float $baselineScoreForSiblingParagraphs): array {
        $text = trim($currentSibling->text());

        if ($currentSibling->is('p, strong') && !empty($text)) {
            return [$currentSibling];
        }

        $results = [];

        $nodes = $currentSibling->find('p, strong');

        foreach ($nodes as $node) {
            $text = trim($node->text());

            if (!empty($text)) {
                $wordStats = $this->config()->getStopWords()->getStopwordCount($text);

                if (($baselineScoreForSiblingParagraphs * self::$SIBLING_BASE_LINE_SCORE) < $wordStats->getStopWordCount()) {
                    $results[] = $node->document()->createElement('p', $text);
                }
            }
        }

        return $results;
    }
private function getSiblingContent(Element $currentSibling, float $baselineScoreForSiblingParagraphs): array {
        $text = trim($currentSibling->text());

        if ($currentSibling->is('p, strong') && !empty($text)) {
            return [$currentSibling];
        }

        $results = [];

        $nodes = $currentSibling->find('p, strong');

        foreach ($nodes as $node) {
            $text = trim($node->text());

            if (!empty($text)) {
                $wordStats = $this->config()->getStopWords()->getStopwordCount($text);

                if (($baselineScoreForSiblingParagraphs * self::$SIBLING_BASE_LINE_SCORE) < $wordStats->getStopWordCount()) {
                    $results[] = $node->document()->createElement('p', $text);
                }
            }
        }

        return $results;
    }
private function getSiblingContent ( Element $ currentSibling , float $ baselineScoreForSiblingParagraphs ) : array { $ text = trim ( $ currentSibling -> text ( ) ) ; if ( $ currentSibling -> is ( 'p, strong' ) && ! empty ( $ text ) ) { return [ $ currentSibling ] ; } $ results = [ ] ; $ nodes = $ currentSibling -> find ( 'p, strong' ) ; foreach ( $ nodes as $ node ) { $ text = trim ( $ node -> text ( ) ) ; if ( ! empty ( $ text ) ) { $ wordStats = $ this -> config ( ) -> getStopWords ( ) -> getStopwordCount ( $ text ) ; if ( ( $ baselineScoreForSiblingParagraphs * self :: $ SIBLING_BASE_LINE_SCORE ) < $ wordStats -> getStopWordCount ( ) ) { $ results [ ] = $ node -> document ( ) -> createElement ( 'p' , $ text ) ; } } } return $ results ; }
Adds any siblings that may have a decent score to this node

@param Element $currentSibling
@param float $baselineScoreForSiblingParagraphs

@return Element[]
Adds any siblings that may have a decent score to this node