diff --git a/Models/NewsArticle.php b/Models/NewsArticle.php index 0175f96..305dffa 100644 --- a/Models/NewsArticle.php +++ b/Models/NewsArticle.php @@ -37,7 +37,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable * @var int * @since 1.0.0 */ - private int $id = 0; + protected int $id = 0; /** * Title. @@ -137,7 +137,6 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable $this->createdBy = new NullAccount(); $this->createdAt = new \DateTime('now'); $this->publish = new \DateTime('now'); - $this->account = new NullAccount(); } /** diff --git a/Models/NullNewsArticle.php b/Models/NullNewsArticle.php index 94fbb3f..ce9d1a7 100644 --- a/Models/NullNewsArticle.php +++ b/Models/NullNewsArticle.php @@ -34,5 +34,6 @@ final class NullNewsArticle extends NewsArticle public function __construct(int $id = 0) { $this->id = $id; + parent::__construct(); } }