1 | <?php |
||
15 | class Injector implements InjectorInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $classDir; |
||
21 | |||
22 | /** |
||
23 | * @var Container |
||
24 | */ |
||
25 | private $container; |
||
26 | |||
27 | /** |
||
28 | * @param AbstractModule $module Binding module |
||
29 | * @param string $tmpDir Temp directory for generated class |
||
30 | */ |
||
31 | 2 | public function __construct(AbstractModule $module = null, string $tmpDir = '') |
|
42 | |||
43 | /** |
||
44 | * Wakeup |
||
45 | */ |
||
46 | public function __wakeup() |
||
59 | |||
60 | /** |
||
61 | * @param string $interface |
||
62 | * @param string $name |
||
63 | * |
||
64 | * @return mixed |
||
65 | */ |
||
66 | public function getInstance($interface, $name = Name::ANY) |
||
77 | |||
78 | /** |
||
79 | * @param string $class |
||
80 | */ |
||
81 | private function bind(string $class) |
||
90 | } |
||
91 |
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: