From baafdd24d996b764bd1dc15df5e83dec63625dfb Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Fri, 26 Jan 2024 18:06:00 +0100 Subject: [PATCH] feat: allow un/serialize for currency --- src/Currency.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Currency.php b/src/Currency.php index 3e20cba4..3e3380c6 100644 --- a/src/Currency.php +++ b/src/Currency.php @@ -67,7 +67,7 @@ public function __serialize(): array return ['code' => $this->code]; } - # TODO Correct PSALM? + // TODO Correct PSALM? public function __unserialize(array $data): void { $this->code = (string) $data['code']; @@ -81,9 +81,10 @@ public function serialize(): array return $this->__serialize(); } - # TODO Correct PSALM? - public function unserialize(string $data) + // TODO Correct PSALM? + // Correct CODE? + public function unserialize(string $data): void { - return $this->__unserialize($data); + $this->__unserialize((array) $data); } }