refactor: deprecate FeedItem constructor (#4201)

* fix: bug in prior commit

* refactor: deprecate FeedItem constructor

* test: fix
This commit is contained in:
Dag 2024-08-08 03:43:26 +02:00 committed by GitHub
parent 2a96bf19b5
commit 6afd13eb06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 78 additions and 114 deletions

View file

@ -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);
}
}
/**