1 | <?php |
||
9 | final class Grapher |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $classDir; |
||
15 | |||
16 | /** |
||
17 | * @var Container |
||
18 | */ |
||
19 | private $container; |
||
20 | |||
21 | /** |
||
22 | * @param AbstractModule $module Binding module |
||
23 | */ |
||
24 | public function __construct(AbstractModule $module, string $classDir) |
||
34 | |||
35 | /** |
||
36 | * Wakeup |
||
37 | */ |
||
38 | public function __wakeup() |
||
49 | |||
50 | /** |
||
51 | * Build an object graph with give constructor parameters |
||
52 | * |
||
53 | * @param string $class class name |
||
54 | * @param array $params constuct paramteters |
||
55 | */ |
||
56 | public function newInstanceArgs(string $class, array $params) |
||
60 | } |
||
61 |
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: