We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | protected function fields() |
||
23 | { |
||
24 | |||
25 | return [ |
||
26 | 'title' => $this->faker->text(60), |
||
27 | 'description' => $this->faker->text(100), |
||
28 | 'expires' => \Carbon\Carbon::now()->endOfYear(), |
||
|
|||
29 | 'image' => $this->faker->imageUrl, |
||
30 | 'user_id' => function () { |
||
31 | return factory(User::class)->make()->id; |
||
32 | }, |
||
33 | 'slug' => $this->faker->slug |
||
34 | ]; |
||
35 | } |
||
36 | } |
||
37 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: