fix minor construct bugs

This commit is contained in:
Dennis Eichhorn 2020-03-05 21:01:09 +01:00
parent 4d0ddae9e6
commit 3190c973fa
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
private int $id = 0; protected int $id = 0;
/** /**
* Title. * Title.
@ -137,7 +137,6 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable
$this->createdBy = new NullAccount(); $this->createdBy = new NullAccount();
$this->createdAt = new \DateTime('now'); $this->createdAt = new \DateTime('now');
$this->publish = new \DateTime('now'); $this->publish = new \DateTime('now');
$this->account = new NullAccount();
} }
/** /**

View File

@ -34,5 +34,6 @@ final class NullNewsArticle extends NewsArticle
public function __construct(int $id = 0) public function __construct(int $id = 0)
{ {
$this->id = $id; $this->id = $id;
parent::__construct();
} }
} }