| 1 | <?php |
||
| 12 | class RecordingDispatcherTest extends \PHPUnit_Framework_TestCase |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var EventDispatcherInterface|MockInterface |
||
| 16 | */ |
||
| 17 | private $mockOriginalDispatcher; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var StatsdClientInterface|MockInterface |
||
| 21 | */ |
||
| 22 | private $mockStatsdClient; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var RecordingDispatcher |
||
| 26 | */ |
||
| 27 | private $dispatcher; |
||
| 28 | |||
| 29 | protected function setUp() |
||
| 36 | |||
| 37 | public function testDispatch() |
||
| 49 | |||
| 50 | } |
||
| 51 |
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: