1 | <?php |
||
14 | class SingleInstanceContainer implements InteropContainerInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var ContainerInterface |
||
18 | */ |
||
19 | private $wrapped; |
||
20 | |||
21 | /** |
||
22 | * @var mixed[] |
||
23 | */ |
||
24 | private $instances = []; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * @param InteropContainerInterface $container |
||
29 | */ |
||
30 | 15 | public function __construct(InteropContainerInterface $container) |
|
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | 9 | public function get($id) |
|
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 6 | public function has($id) |
|
54 | } |
||
55 |
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.