1 | <?php |
||
12 | final class GitAdapterUnitTest extends PHPUnit_Framework_TestCase |
||
13 | { |
||
14 | /** @var GitAdapter */ |
||
15 | private $adapter; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $repoPath; |
||
19 | |||
20 | /** @var MockInterface|ShellAdapter */ |
||
21 | private $shell; |
||
22 | |||
23 | /** |
||
24 | * @before |
||
25 | */ |
||
26 | public function setUpAdapter() |
||
32 | |||
33 | /** |
||
34 | * @test |
||
35 | * |
||
36 | * @small |
||
37 | */ |
||
38 | public function findMostChangedFiles() |
||
53 | } |
||
54 |
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: