From 923e2b33c22040d650b6d047b933492f00f0e479 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 6 Jun 2023 12:16:16 +0900 Subject: [PATCH] refactor: fix incorrect return value See https://www.php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members --- system/Entity/Entity.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/system/Entity/Entity.php b/system/Entity/Entity.php index 4247c82b66fe..07e1e26393c8 100644 --- a/system/Entity/Entity.php +++ b/system/Entity/Entity.php @@ -429,7 +429,7 @@ public function cast(?bool $cast = null) * * @param array|bool|float|int|object|string|null $value * - * @return $this + * @return void * * @throws Exception */ @@ -452,7 +452,7 @@ public function __set(string $key, $value = null) if (method_exists($this, $method)) { $this->{$method}($value); - return $this; + return; } // Otherwise, just the value. This allows for creation of new @@ -460,8 +460,6 @@ public function __set(string $key, $value = null) // saved. Useful for grabbing values through joins, assigning // relationships, etc. $this->attributes[$dbColumn] = $value; - - return $this; } /**