| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 43 | protected function getAttribute($object, $item, array $arguments = array(), $type = \Twig_TemplateInterface::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) |
||
| 44 | { |
||
| 45 | $attribute = parent::getAttribute($object, $item, $arguments, $type, $isDefinedTest); |
||
| 46 | |||
| 47 | if (self::$recorder && is_object($object)) { |
||
| 48 | self::$recorder->add($object); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $attribute; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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.