Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | public function getParameters(): array |
||
45 | { |
||
46 | $parameterBag = $this->container->getParameterBag(); |
||
47 | |||
48 | if (!$this->container->isCompiled()) { |
||
49 | $parameterBag = clone $parameterBag; |
||
50 | $parameterBag->resolve(); |
||
51 | } |
||
52 | |||
53 | return array_map(function ($unescapedValue) use ($parameterBag) { |
||
54 | return $parameterBag->escapeValue($unescapedValue); |
||
55 | }, $parameterBag->all()); |
||
56 | } |
||
57 | } |
||
58 |
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.