We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 19 | class BaseRepository |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var Builder|Collection |
||
| 24 | */ |
||
| 25 | protected $model; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public function all() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param int $integer |
||
| 37 | * @return \Illuminate\Database\Eloquent\Model|null|static |
||
| 38 | */ |
||
| 39 | public function whereID(int $integer) |
||
| 43 | |||
| 44 | } |
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: