cards; } /** * Add a card * * @param KanbanCard $card Card * * @return void * * @since 1.0.0 */ public function addCard(KanbanCard $card) : void { $this->cards[] = $card; } /** * Remove a card * * @param int $id Card to remove * * @return bool * * @since 1.0.0 */ public function removeCard(int $id) : bool { if (isset($this->cards[$id])) { unset($this->cards[$id]); return true; } return false; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'name' => $this->name, 'order' => $this->order, 'board' => $this->board, 'cards' => $this->cards, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }