refactor(Model): Type hint setNull variadic arguments
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user