1 | <?php declare(strict_types = 1); |
||
15 | class Invoker implements InvokerContract |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var ContainerContract |
||
20 | */ |
||
21 | private $container; |
||
22 | |||
23 | /** |
||
24 | * @var ArgumentResolverContract |
||
25 | */ |
||
26 | private $resolver; |
||
27 | |||
28 | /** |
||
29 | * Invoker constructor. |
||
30 | * |
||
31 | * @param ContainerContract $container |
||
32 | * @param ArgumentResolverContract $resolver |
||
33 | */ |
||
34 | 44 | public function __construct(ContainerContract $container, ArgumentResolverContract $resolver) |
|
39 | |||
40 | /** |
||
41 | * @inheritDoc |
||
42 | */ |
||
43 | 15 | public function call($callable, array $arguments = []) |
|
47 | |||
48 | /** |
||
49 | * @inheritDoc |
||
50 | */ |
||
51 | 32 | public function invoke(Invokable $invokable, array $arguments = []) |
|
77 | |||
78 | /** |
||
79 | * @inheritDoc |
||
80 | */ |
||
81 | 1 | public function isCallable($callable): bool |
|
95 | |||
96 | |||
97 | } |
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: