From c2938cdec9ee8feeb5b4d925d22282feb6487a9e Mon Sep 17 00:00:00 2001 From: Will Power <1619102+willpower232@users.noreply.github.com> Date: Mon, 20 Jan 2025 16:52:51 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20unserialize=20must=20be=20void?= =?UTF-8?q?=20(#996)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Events/DispatchAudit.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Events/DispatchAudit.php b/src/Events/DispatchAudit.php index 3acfd144..eb2d4235 100644 --- a/src/Events/DispatchAudit.php +++ b/src/Events/DispatchAudit.php @@ -56,7 +56,7 @@ public function __serialize() foreach ($customProperties as $key) { try { $values['model_data'][$key] = $this->getModelPropertyValue($reflection, $key); - } catch (\Throwable $e){ + } catch (\Throwable $e) { // } } @@ -67,10 +67,9 @@ public function __serialize() /** * Restore the model after serialization. * - * @param array $values - * @return array + * @param array $values */ - public function __unserialize(array $values) + public function __unserialize(array $values): void { $this->model = new $values['class']; @@ -78,8 +77,6 @@ public function __unserialize(array $values) foreach ($values['model_data'] as $key => $value) { $this->setModelPropertyValue($reflection, $key, $value); } - - return $values; } /**