| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function xmlSerialize(SimpleXMLElement $xmlRoot = null) |
||
| 37 | { |
||
| 38 | $xmlString = $this->getSerializer()->serialize($this, 'xml'); |
||
| 39 | $xmlObject = new SimpleXMLElement($xmlString); |
||
| 40 | |||
| 41 | if ($xmlRoot===null) { |
||
| 42 | return $xmlObject; |
||
| 43 | } |
||
| 44 | |||
| 45 | $domRoot = dom_import_simplexml($xmlRoot); |
||
| 46 | $domObject = dom_import_simplexml($xmlObject); |
||
| 47 | |||
| 48 | $domRoot->appendChild($domRoot->ownerDocument->importNode($domObject, true)); |
||
| 49 | |||
| 50 | return $xmlRoot; |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
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..