task = $task ?? new Task(); $this->task->type = TaskType::HIDDEN; $this->app = new SupportApp(); } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'task' => $this->task, 'app' => $this->app, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }