1 | <?php |
||
10 | class Injector implements InjectorInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $classDir; |
||
16 | |||
17 | /** |
||
18 | * @var Container |
||
19 | */ |
||
20 | private $container; |
||
21 | |||
22 | /** |
||
23 | * @param AbstractModule $module Binding module |
||
24 | * @param string $tmpDir Temp directory for generated class |
||
25 | */ |
||
26 | public function __construct(AbstractModule $module = null, string $tmpDir = '') |
||
37 | |||
38 | /** |
||
39 | * Wakeup |
||
40 | */ |
||
41 | public function __wakeup() |
||
52 | |||
53 | /** |
||
54 | * @param string $interface |
||
55 | * @param string $name |
||
56 | */ |
||
57 | public function getInstance($interface, $name = Name::ANY) |
||
68 | |||
69 | public function getInstanceWithArgs(string $interface, string $name, array $params) |
||
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: