Use native typing in more places and clean up 'FeedEnclosure' a bit.

This commit is contained in:
wn_
2024-12-10 20:31:16 +00:00
parent 333bab90a7
commit a1bd6cea1b
13 changed files with 71 additions and 115 deletions

View File

@@ -141,15 +141,13 @@ class FeedItem_RSS extends FeedItem_Common {
$encs = array();
foreach ($enclosures as $enclosure) {
$enc = new FeedEnclosure();
$enc->type = clean($enclosure->getAttribute("type"));
$enc->link = clean($enclosure->getAttribute("url"));
$enc->length = clean($enclosure->getAttribute("length"));
$enc->height = clean($enclosure->getAttribute("height"));
$enc->width = clean($enclosure->getAttribute("width"));
array_push($encs, $enc);
$encs[] = new FeedEnclosure(
type: clean($enclosure->getAttribute('type')),
link: clean($enclosure->getAttribute('url')),
length: clean($enclosure->getAttribute('length')),
height: clean($enclosure->getAttribute('height')),
width: clean($enclosure->getAttribute('width')),
);
}
array_push($encs, ...parent::get_enclosures());