From 14a0aa3175caddc6ee223c44328b81aa0a201e5d 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/NullPromotion.php | 8 ++++++++ Models/NullPromotionAttribute.php | 8 ++++++++ Models/NullPromotionAttributeType.php | 8 ++++++++ Models/NullPromotionAttributeTypeL11n.php | 8 ++++++++ Models/NullPromotionAttributeValue.php | 8 ++++++++ 5 files changed, 40 insertions(+) diff --git a/Models/NullPromotion.php b/Models/NullPromotion.php index baae8b5..9d5e30f 100755 --- a/Models/NullPromotion.php +++ b/Models/NullPromotion.php @@ -36,4 +36,12 @@ final class NullPromotion extends Promotion parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullPromotionAttribute.php b/Models/NullPromotionAttribute.php index f09b0df..fde4a23 100755 --- a/Models/NullPromotionAttribute.php +++ b/Models/NullPromotionAttribute.php @@ -36,4 +36,12 @@ final class NullPromotionAttribute extends PromotionAttribute parent::__construct(); $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullPromotionAttributeType.php b/Models/NullPromotionAttributeType.php index d1ef7f6..2ca95e2 100755 --- a/Models/NullPromotionAttributeType.php +++ b/Models/NullPromotionAttributeType.php @@ -35,4 +35,12 @@ final class NullPromotionAttributeType extends PromotionAttributeType { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullPromotionAttributeTypeL11n.php b/Models/NullPromotionAttributeTypeL11n.php index e0853cd..411c1bb 100755 --- a/Models/NullPromotionAttributeTypeL11n.php +++ b/Models/NullPromotionAttributeTypeL11n.php @@ -35,4 +35,12 @@ final class NullPromotionAttributeTypeL11n extends PromotionAttributeTypeL11n { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullPromotionAttributeValue.php b/Models/NullPromotionAttributeValue.php index 535de3d..3a1b2ae 100755 --- a/Models/NullPromotionAttributeValue.php +++ b/Models/NullPromotionAttributeValue.php @@ -35,4 +35,12 @@ final class NullPromotionAttributeValue extends PromotionAttributeValue { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } }