From 54066c99d6a887bfe6f52b030fd490d5e6b25472 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 9 Nov 2022 23:02:52 +0100 Subject: [PATCH] reduce serialization of null models --- Models/NullKanbanBoard.php | 8 ++++++++ Models/NullKanbanCard.php | 8 ++++++++ Models/NullKanbanCardComment.php | 8 ++++++++ Models/NullKanbanColumn.php | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/Models/NullKanbanBoard.php b/Models/NullKanbanBoard.php index 8a8fcd4..56f15fb 100755 --- a/Models/NullKanbanBoard.php +++ b/Models/NullKanbanBoard.php @@ -36,4 +36,12 @@ final class NullKanbanBoard extends KanbanBoard parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullKanbanCard.php b/Models/NullKanbanCard.php index a278719..5461588 100755 --- a/Models/NullKanbanCard.php +++ b/Models/NullKanbanCard.php @@ -36,4 +36,12 @@ final class NullKanbanCard extends KanbanCard parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullKanbanCardComment.php b/Models/NullKanbanCardComment.php index 05ac8b6..20c44a5 100755 --- a/Models/NullKanbanCardComment.php +++ b/Models/NullKanbanCardComment.php @@ -36,4 +36,12 @@ final class NullKanbanCardComment extends KanbanCardComment parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullKanbanColumn.php b/Models/NullKanbanColumn.php index ca32645..f1b050f 100755 --- a/Models/NullKanbanColumn.php +++ b/Models/NullKanbanColumn.php @@ -35,4 +35,12 @@ final class NullKanbanColumn extends KanbanColumn { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } }