createdBy = new NullAccount(); $this->createdFor = new NullAccount(); $this->createdAt = new \DateTimeImmutable('now'); } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'createdBy' => $this->createdBy, 'createdAt' => $this->createdAt, 'title' => $this->title, 'description' => $this->description, 'descriptionRaw' => $this->descriptionRaw, 'status' => $this->status, 'type' => $this->type, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }