| 1 | <?php |
||
| 10 | trait ResolverTrait |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param string|callable|MiddlewareInterface $ref |
||
| 15 | * @param ContainerInterface $container |
||
| 16 | * @param string $expectedClass |
||
| 17 | * @return mixed |
||
| 18 | * @throws UnresolvedException |
||
| 19 | */ |
||
| 20 | 11 | public function resolveByContainer($ref, ContainerInterface $container, $expectedClass) |
|
| 37 | } |
||
| 38 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: