| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function index(GistFinder $gistFinder) |
||
| 16 | { |
||
| 17 | $gistsAndTags = $gistFinder->fetchGistsAndTags(); |
||
| 18 | |||
| 19 | $state = collect([ |
||
| 20 | 'user' => auth()->user(), |
||
|
|
|||
| 21 | 'gists' => $gistsAndTags['gists'], |
||
| 22 | 'tags' => $gistsAndTags['tags'] |
||
| 23 | ]); |
||
| 24 | |||
| 25 | return view('gists.index', compact('state')); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |
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: