1 | <?php |
||
21 | final class ContainerBuilder implements ContainerAwareInterface |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var ContainerInterface |
||
26 | */ |
||
27 | private $container; |
||
28 | |||
29 | /** |
||
30 | * @var array|string |
||
31 | */ |
||
32 | private $definitions; |
||
33 | |||
34 | public function __construct($definitions = []) |
||
38 | |||
39 | /** |
||
40 | * Get current container |
||
41 | * |
||
42 | * If no container was created a new, empty container will be created. |
||
43 | * |
||
44 | * @return ContainerInterface|Container |
||
45 | */ |
||
46 | public function getContainer() |
||
54 | |||
55 | |||
56 | /** |
||
57 | * Set the dependency container |
||
58 | 8 | * |
|
59 | * @param InteropContainer $container |
||
60 | 8 | * |
|
61 | 8 | * @return ContainerBuilder |
|
62 | 8 | */ |
|
63 | public function setContainer(InteropContainer $container) |
||
68 | |||
69 | 6 | /** |
|
70 | * Hydrates the container with provided definitions |
||
71 | 6 | * |
|
72 | 6 | * @param string|array $definitions |
|
73 | 6 | */ |
|
74 | 6 | protected function hydrateContainer($definitions) |
|
85 | 6 | ||
86 | 6 | /** |
|
87 | 6 | * Hydrate the container with definitions from provided file |
|
88 | 6 | * |
|
89 | 6 | * @param $definitions |
|
90 | */ |
||
91 | 6 | protected function hydrateFromFile($definitions) |
|
101 | |||
102 | protected function hydrateFromDirectory($definitions) |
||
119 | } |
||
120 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.