mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 15:47:32 +02:00
refactor: deprecate FeedItem constructor (#4201)
* fix: bug in prior commit * refactor: deprecate FeedItem constructor * test: fix
This commit is contained in:
@@ -6,11 +6,11 @@ abstract class FormatAbstract
|
||||
|
||||
const MIME_TYPE = 'text/plain';
|
||||
|
||||
protected string $charset = 'UTF-8';
|
||||
protected array $items = [];
|
||||
protected int $lastModified;
|
||||
|
||||
protected array $feed = [];
|
||||
protected array $items = [];
|
||||
protected string $charset = 'UTF-8';
|
||||
|
||||
protected int $lastModified;
|
||||
|
||||
abstract public function stringify();
|
||||
|
||||
@@ -30,12 +30,11 @@ abstract class FormatAbstract
|
||||
return $this->feed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FeedItem[] $items
|
||||
*/
|
||||
public function setItems(array $items): void
|
||||
{
|
||||
$this->items = $items;
|
||||
foreach ($items as $item) {
|
||||
$this->items[] = FeedItem::fromArray($item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user