createdAt = new \DateTimeImmutable('now'); $this->createdBy = new NullAccount(); } /** * Get the columns * * @return array * * @since 1.0.0 */ public function getColumns() : array { return $this->columns; } /** * Add a column * * @param KanbanColumn $column Column * * @return void * * @since 1.0.0 */ public function addColumn(KanbanColumn $column) : void { $this->columns[] = $column; } /** * Remove a column * * @param int $id Id to remove * * @return bool * * @since 1.0.0 */ public function removeColumn(int $id) : bool { if (isset($this->columns[$id])) { unset($this->columns[$id]); return true; } return false; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'status' => $this->status, 'columns' => $this->columns, 'tags' => $this->tags, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }