From 2aec6b2c946d2e75bac0931ea52a86f61f386554 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/NullSupportApp.php | 8 ++++++++ Models/NullTicket.php | 8 ++++++++ Models/NullTicketAttribute.php | 8 ++++++++ Models/NullTicketAttributeType.php | 8 ++++++++ Models/NullTicketAttributeTypeL11n.php | 8 ++++++++ Models/NullTicketAttributeValue.php | 8 ++++++++ Models/NullTicketElement.php | 8 ++++++++ 7 files changed, 56 insertions(+) diff --git a/Models/NullSupportApp.php b/Models/NullSupportApp.php index fec68fc..6469183 100755 --- a/Models/NullSupportApp.php +++ b/Models/NullSupportApp.php @@ -35,4 +35,12 @@ final class NullSupportApp extends SupportApp { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullTicket.php b/Models/NullTicket.php index 7e9943e..81cb450 100755 --- a/Models/NullTicket.php +++ b/Models/NullTicket.php @@ -36,4 +36,12 @@ final class NullTicket extends Ticket $this->id = $id; parent::__construct(); } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullTicketAttribute.php b/Models/NullTicketAttribute.php index c51804d..5b2e36c 100755 --- a/Models/NullTicketAttribute.php +++ b/Models/NullTicketAttribute.php @@ -36,4 +36,12 @@ final class NullTicketAttribute extends TicketAttribute parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullTicketAttributeType.php b/Models/NullTicketAttributeType.php index 79c9834..53662df 100755 --- a/Models/NullTicketAttributeType.php +++ b/Models/NullTicketAttributeType.php @@ -35,4 +35,12 @@ final class NullTicketAttributeType extends TicketAttributeType { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullTicketAttributeTypeL11n.php b/Models/NullTicketAttributeTypeL11n.php index 96cff9f..fa800e3 100755 --- a/Models/NullTicketAttributeTypeL11n.php +++ b/Models/NullTicketAttributeTypeL11n.php @@ -35,4 +35,12 @@ final class NullTicketAttributeTypeL11n extends TicketAttributeTypeL11n { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullTicketAttributeValue.php b/Models/NullTicketAttributeValue.php index 2a23a34..df7a35a 100755 --- a/Models/NullTicketAttributeValue.php +++ b/Models/NullTicketAttributeValue.php @@ -35,4 +35,12 @@ final class NullTicketAttributeValue extends TicketAttributeValue { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullTicketElement.php b/Models/NullTicketElement.php index 545f21c..a0eb083 100755 --- a/Models/NullTicketElement.php +++ b/Models/NullTicketElement.php @@ -36,4 +36,12 @@ final class NullTicketElement extends TicketElement $this->id = $id; parent::__construct(); } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } }