diff --git a/src/Libs/Model.php b/src/Libs/Model.php index e58d628..f31d0f6 100644 --- a/src/Libs/Model.php +++ b/src/Libs/Model.php @@ -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; } } }