From f6238c9dc0dd83738e9f023d8ca229fb4820d022 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/NullEventAttribute.php | 8 ++++++++ Models/NullEventAttributeType.php | 8 ++++++++ Models/NullEventAttributeTypeL11n.php | 8 ++++++++ Models/NullEventAttributeValue.php | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/Models/NullEventAttribute.php b/Models/NullEventAttribute.php index 1b20bc4..90f4061 100755 --- a/Models/NullEventAttribute.php +++ b/Models/NullEventAttribute.php @@ -36,4 +36,12 @@ final class NullEventAttribute extends EventAttribute parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullEventAttributeType.php b/Models/NullEventAttributeType.php index fc2069b..351ef5c 100755 --- a/Models/NullEventAttributeType.php +++ b/Models/NullEventAttributeType.php @@ -35,4 +35,12 @@ final class NullEventAttributeType extends EventAttributeType { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullEventAttributeTypeL11n.php b/Models/NullEventAttributeTypeL11n.php index e7c4f9a..72a7182 100755 --- a/Models/NullEventAttributeTypeL11n.php +++ b/Models/NullEventAttributeTypeL11n.php @@ -35,4 +35,12 @@ final class NullEventAttributeTypeL11n extends EventAttributeTypeL11n { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullEventAttributeValue.php b/Models/NullEventAttributeValue.php index 2b79639..52af573 100755 --- a/Models/NullEventAttributeValue.php +++ b/Models/NullEventAttributeValue.php @@ -35,4 +35,12 @@ final class NullEventAttributeValue extends EventAttributeValue { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } }