private function getLinks(): array {
        $goodLinks = [];

        $parentNode = $this->article()->getTopNode()->parent();

        if ($parentNode instanceof Element) {
            $candidates = $parentNode->find('a[href]');

            foreach ($candidates as $el) {
                if ($el->attr('href') != '#' && trim($el->attr('href')) != '') {
                    $goodLinks[] = [
                        'url' => $el->attr('href'),
                        'text' => Helper::textNormalise($el->text()),
                    ];
                }
            }
        }

        return $goodLinks;
    }
private function getLinks(): array {
        $goodLinks = [];

        $parentNode = $this->article()->getTopNode()->parent();

        if ($parentNode instanceof Element) {
            $candidates = $parentNode->find('a[href]');

            foreach ($candidates as $el) {
                if ($el->attr('href') != '#' && trim($el->attr('href')) != '') {
                    $goodLinks[] = [
                        'url' => $el->attr('href'),
                        'text' => Helper::textNormalise($el->text()),
                    ];
                }
            }
        }

        return $goodLinks;
    }
private function getLinks ( ) : array { $ goodLinks = [ ] ; $ parentNode = $ this -> article ( ) -> getTopNode ( ) -> parent ( ) ; if ( $ parentNode instanceof Element ) { $ candidates = $ parentNode -> find ( 'a[href]' ) ; foreach ( $ candidates as $ el ) { if ( $ el -> attr ( 'href' ) != '#' && trim ( $ el -> attr ( 'href' ) ) != '' ) { $ goodLinks [ ] = [ 'url' => $ el -> attr ( 'href' ) , 'text' => Helper :: textNormalise ( $ el -> text ( ) ) , ] ; } } } return $ goodLinks ; }
Pulls out links we like

@return array
Pulls out links we like