private function filterBadNames(NodeList $images): array {
        $goodImages = [];

        foreach ($images as $image) {
            if ($this->isOkImageFileName($image)) {
                $goodImages[] = $image;
            } else {
                $image->remove();
            }
        }

        return $goodImages;
    }
private function filterBadNames(NodeList $images): array {
        $goodImages = [];

        foreach ($images as $image) {
            if ($this->isOkImageFileName($image)) {
                $goodImages[] = $image;
            } else {
                $image->remove();
            }
        }

        return $goodImages;
    }
private function filterBadNames ( NodeList $ images ) : array { $ goodImages = [ ] ; foreach ( $ images as $ image ) { if ( $ this -> isOkImageFileName ( $ image ) ) { $ goodImages [ ] = $ image ; } else { $ image -> remove ( ) ; } } return $ goodImages ; }
takes a list of image elements and filters out the ones with bad names

@param \DOMWrap\NodeList $images

@return Element[]
takes a list of image elements and filters out the ones with bad names