| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function encode(array $data, $rootNode='root') |
||
| 25 | { |
||
| 26 | $x = new \XmlWriter(); |
||
| 27 | $x->openMemory(); |
||
| 28 | $x->startDocument($this->version, $this->encoding); |
||
| 29 | if (null !== $rootNode) { |
||
| 30 | $x->startElement($rootNode); |
||
| 31 | } |
||
| 32 | $this->arrayToXmlWriter($x, $data); |
||
| 33 | $x->endDocument(); |
||
| 34 | |||
| 35 | return $x->outputMemory(true); |
||
| 36 | } |
||
| 37 | |||
| 66 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.