Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | protected function shouldHandleComposerFilesExtractorQuery( |
||
33 | ComposerFilesExtractor $composerFilesFilesExtractorQuery, |
||
34 | ComposerFilesResponse $return |
||
35 | ) { |
||
36 | $this->getComposerFilesExtractorQueryHandler() |
||
|
|||
37 | ->shouldReceive('handle') |
||
38 | ->once() |
||
39 | ->with((new SimilarTo())->compare($composerFilesFilesExtractorQuery)) |
||
40 | ->andReturn($return) |
||
41 | ; |
||
42 | } |
||
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: