refactor(Model): Type hint setNull variadic arguments

This commit is contained in:
kj
2025-10-10 21:06:11 -03:00
parent b41514a491
commit 2f50532e13

View File

@@ -985,19 +985,12 @@ class Model
*
* @return void
*/
public function setNull(...$attributes): void
public function setNull(string ...$attributes): void
{
if (is_array($attributes)) {
foreach ($attributes as $att) {
if (!in_array($att, $this->toNull)) {
$this->toNull[] = $att;
}
foreach ($attributes as $att) {
if (!in_array($att, $this->toNull)) {
$this->toNull[] = $att;
}
return;
}
if (!in_array($attributes, $this->toNull)) {
$this->toNull[] = $attributes;
}
}
}