From bea6ed1a3f253dac2bdd5b7d7694da670872b3fe 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/NullClient.php | 8 ++++++++ Models/NullClientAttribute.php | 8 ++++++++ Models/NullClientAttributeType.php | 8 ++++++++ Models/NullClientAttributeTypeL11n.php | 8 ++++++++ Models/NullClientAttributeValue.php | 8 ++++++++ 5 files changed, 40 insertions(+) diff --git a/Models/NullClient.php b/Models/NullClient.php index 080c417..a8df3f9 100755 --- a/Models/NullClient.php +++ b/Models/NullClient.php @@ -36,4 +36,12 @@ final class NullClient extends Client $this->id = $id; parent::__construct(); } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullClientAttribute.php b/Models/NullClientAttribute.php index 58a310d..dae1ea7 100755 --- a/Models/NullClientAttribute.php +++ b/Models/NullClientAttribute.php @@ -36,4 +36,12 @@ final class NullClientAttribute extends ClientAttribute parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullClientAttributeType.php b/Models/NullClientAttributeType.php index 9930318..7ff5fe5 100755 --- a/Models/NullClientAttributeType.php +++ b/Models/NullClientAttributeType.php @@ -35,4 +35,12 @@ final class NullClientAttributeType extends ClientAttributeType { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullClientAttributeTypeL11n.php b/Models/NullClientAttributeTypeL11n.php index 45641ce..f500660 100755 --- a/Models/NullClientAttributeTypeL11n.php +++ b/Models/NullClientAttributeTypeL11n.php @@ -35,4 +35,12 @@ final class NullClientAttributeTypeL11n extends ClientAttributeTypeL11n { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullClientAttributeValue.php b/Models/NullClientAttributeValue.php index dc6dc86..5c69363 100755 --- a/Models/NullClientAttributeValue.php +++ b/Models/NullClientAttributeValue.php @@ -35,4 +35,12 @@ final class NullClientAttributeValue extends ClientAttributeValue { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } }