1 | <?php |
||
9 | class GistsController extends Controller |
||
10 | { |
||
11 | /** |
||
12 | * Show gists list. |
||
13 | * |
||
14 | * @param GistFinder $gistFinder |
||
15 | * |
||
16 | * @return \Illuminate\View\View |
||
17 | */ |
||
18 | public function index(GistFinder $gistFinder) |
||
30 | |||
31 | /** |
||
32 | * Backup authorized user gists. |
||
33 | * |
||
34 | * @param GistBackupHandler $backupHandler |
||
35 | * |
||
36 | * @return \Symfony\Component\HttpFoundation\BinaryFileResponse |
||
37 | */ |
||
38 | public function backup(GistBackupHandler $backupHandler) |
||
60 | } |
||
61 |
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: