| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function testBuildDefinition() |
||
| 48 | { |
||
| 49 | $definition = $this->abstractBehaviorsExtension->buildDefinitionFromCallablePublic(LoggerCallable::class); |
||
| 50 | |||
| 51 | $this->assertSame(LoggerCallable::class, $definition->getClass()); |
||
| 52 | $this->assertSame(LoggerCallable::class, $definition->getFactory()->getEntity()); |
||
| 53 | } |
||
| 54 | |||
| 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: