| 1 | <?php namespace Arcanesoft\Foundation\Providers; | ||
| 11 | class ComposerServiceProvider extends ServiceProvider | ||
| 12 | { | ||
| 13 | /* ------------------------------------------------------------------------------------------------ | ||
| 14 | | Main Functions | ||
| 15 | | ------------------------------------------------------------------------------------------------ | ||
| 16 | */ | ||
| 17 | /** | ||
| 18 |      * {@inheritdoc} | ||
| 19 | */ | ||
| 20 | 24 | public function boot() | |
| 27 | |||
| 28 | /** | ||
| 29 |      * {@inheritdoc} | ||
| 30 | */ | ||
| 31 | 24 | public function register() | |
| 35 | } | ||
| 36 | 
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: