Update PropertiesBase to new patterns and improve static analysis checks

This commit is contained in:
Alex Cabal 2022-06-30 13:23:05 -05:00
parent 5f0b57f7e9
commit 6c8414f844
33 changed files with 335 additions and 148 deletions

View file

@ -12,6 +12,13 @@ class AtomFeed extends Feed{
public $Updated = null;
public $Subtitle = null;
/**
* @param string $title
* @param string $subtitle
* @param string $url
* @param string $path
* @param array<Ebook> $entries
*/
public function __construct(string $title, string $subtitle, string $url, string $path, array $entries){
parent::__construct($title, $url, $path, $entries);
$this->Subtitle = $subtitle;
@ -19,6 +26,11 @@ class AtomFeed extends Feed{
$this->Stylesheet = '/feeds/atom/style';
}
// *******
// METHODS
// *******
protected function GetXmlString(): string{
if($this->XmlString === null){
$feed = Template::AtomFeed(['id' => $this->Id, 'url' => $this->Url, 'title' => $this->Title, 'subtitle' => $this->Subtitle, 'updated' => $this->Updated, 'entries' => $this->Entries]);