From 0f9cac331ee02e1b11fa87609ef729e8280df8af 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/NullExchangeLog.php | 8 ++++++++ Models/NullExchangeSetting.php | 8 ++++++++ Models/NullInterfaceManager.php | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/Models/NullExchangeLog.php b/Models/NullExchangeLog.php index f8b1663..91e2291 100755 --- a/Models/NullExchangeLog.php +++ b/Models/NullExchangeLog.php @@ -36,4 +36,12 @@ final class NullExchangeLog extends ExchangeLog $this->id = $id; parent::__construct(); } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullExchangeSetting.php b/Models/NullExchangeSetting.php index 769d1cd..f10ddd5 100755 --- a/Models/NullExchangeSetting.php +++ b/Models/NullExchangeSetting.php @@ -35,4 +35,12 @@ final class NullExchangeSetting extends ExchangeSetting { $this->id = $id; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } } diff --git a/Models/NullInterfaceManager.php b/Models/NullInterfaceManager.php index 2fa0ae8..f77b63d 100755 --- a/Models/NullInterfaceManager.php +++ b/Models/NullInterfaceManager.php @@ -36,4 +36,12 @@ final class NullInterfaceManager extends InterfaceManager $this->id = $id; parent::__construct(); } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } }