From 3190c973fa0b692342b17eb9d89986fbfce1022d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 5 Mar 2020 21:01:09 +0100 Subject: [PATCH] fix minor construct bugs --- Models/NewsArticle.php | 3 +-- Models/NullNewsArticle.php | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) 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(); } }