mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-30 04:39:01 +01:00
fix: allow firstOrNew/Create to be called without parameters
This commit is contained in:
parent
bb47983d73
commit
25a9bf7ef0
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user