Skip to content

Commit 335ab86

Browse files
authored
Merge pull request #7542 from kenjis/fix-Entity-return-type
refactor: [Entity] fix incorrect return value
2 parents 2b04972 + 923e2b3 commit 335ab86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

system/Entity/Entity.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public function cast(?bool $cast = null)
429429
*
430430
* @param array|bool|float|int|object|string|null $value
431431
*
432-
* @return $this
432+
* @return void
433433
*
434434
* @throws Exception
435435
*/
@@ -452,16 +452,14 @@ public function __set(string $key, $value = null)
452452
if (method_exists($this, $method)) {
453453
$this->{$method}($value);
454454

455-
return $this;
455+
return;
456456
}
457457

458458
// Otherwise, just the value. This allows for creation of new
459459
// class properties that are undefined, though they cannot be
460460
// saved. Useful for grabbing values through joins, assigning
461461
// relationships, etc.
462462
$this->attributes[$dbColumn] = $value;
463-
464-
return $this;
465463
}
466464

467465
/**

0 commit comments

Comments
 (0)