| Conditions | 5 |
| Paths | 7 |
| Total Lines | 26 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | protected function _parse(&$variable) |
||
| 18 | { |
||
| 19 | try { |
||
| 20 | if ( |
||
| 21 | (string)$variable === $variable |
||
| 22 | && |
||
| 23 | 0 === strpos($variable, '<?xml') |
||
| 24 | ) { |
||
| 25 | $e = libxml_use_internal_errors(true); |
||
| 26 | $xml = simplexml_load_string($variable); |
||
| 27 | libxml_use_internal_errors($e); |
||
| 28 | if (empty($xml)) { |
||
| 29 | return false; |
||
| 30 | } |
||
| 31 | } else { |
||
| 32 | return false; |
||
| 33 | } |
||
| 34 | } catch (\Exception $e) { |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->value = KintParser::factory($xml)->extendedValue; |
||
|
|
|||
| 39 | $this->type = 'XML'; |
||
| 40 | |||
| 41 | return true; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..