1 | <?php |
||
15 | final class AbstractBehaviorExtensionTest extends TestCase |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var AbstractBehaviorExtension|SomeBehaviorExtension |
||
20 | */ |
||
21 | private $abstractBehaviorsExtension; |
||
22 | |||
23 | |||
24 | protected function setUp() |
||
29 | |||
30 | |||
31 | public function testGetClassAnalyzer() |
||
39 | |||
40 | |||
41 | public function testBuildDefinitionWithNullValue() |
||
45 | |||
46 | |||
47 | public function testBuildDefinition() |
||
54 | |||
55 | } |
||
56 |
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: