fix: allow firstOrNew/Create to be called without parameters

This commit is contained in:
Claas Augner 2021-06-23 18:59:11 +02:00
parent bb47983d73
commit 25a9bf7ef0
2 changed files with 4 additions and 4 deletions

View File

@ -141,14 +141,14 @@ class Builder
* @param array $values
* @return TModel
*/
public function firstOrNew(array $attributes, array $values = []) { }
public function firstOrNew(array $attributes = [], array $values = []) { }
/**
* @param array $attributes
* @param array $values
* @return TModel
*/
public function firstOrCreate(array $attributes, array $values = []) { }
public function firstOrCreate(array $attributes = [], array $values = []) { }
/**
* @param array $attributes

View File

@ -52,7 +52,7 @@ abstract class HasOneOrMany extends Relation
* @return \Illuminate\Database\Eloquent\Model
* @psalm-return TRelatedModel
*/
public function firstOrNew(array $attributes, array $values = []) { }
public function firstOrNew(array $attributes = [], array $values = []) { }
/**
* @param array $attributes
@ -60,7 +60,7 @@ abstract class HasOneOrMany extends Relation
* @return \Illuminate\Database\Eloquent\Model
* @psalm-return TRelatedModel
*/
public function firstOrCreate(array $attributes, array $values = []) { }
public function firstOrCreate(array $attributes = [], array $values = []) { }
/**
* @param array $attributes