department = new NullDepartment(); } /** * Get status * * @return int * * @since 1.0.0 */ public function getStatus() : int { return $this->status; } /** * Set status * * @param int $status Status * * @return void * * @since 1.0.0 */ public function setStatus(int $status) : void { $this->status = $status; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'name' => $this->name, 'status' => $this->status, 'description' => $this->description, 'descriptionRaw' => $this->descriptionRaw, 'department' => $this->department ?? new NullDepartment(), 'parent' => $this->parent, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }