1 | <?php |
||
28 | class XML |
||
29 | { |
||
30 | /** |
||
31 | * XML to array. |
||
32 | * |
||
33 | * @param string $xml XML string |
||
34 | * |
||
35 | * @return array|\SimpleXMLElement |
||
36 | */ |
||
37 | public static function parse($xml) |
||
41 | |||
42 | /** |
||
43 | * XML encode. |
||
44 | * |
||
45 | * @param mixed $data |
||
46 | * @param string $root |
||
47 | * @param string $item |
||
48 | * @param string $attr |
||
49 | * @param string $id |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | public static function build( |
||
78 | |||
79 | /** |
||
80 | * Build CDATA. |
||
81 | * |
||
82 | * @param string $string |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | public static function cdata($string) |
||
90 | |||
91 | /** |
||
92 | * Object to array. |
||
93 | * |
||
94 | * @param string $data |
||
|
|||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | protected static function normalize($obj) |
||
121 | |||
122 | /** |
||
123 | * Array to XML. |
||
124 | * |
||
125 | * @param array $data |
||
126 | * @param string $item |
||
127 | * @param string $id |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | protected static function data2Xml($data, $item = 'item', $id = 'id') |
||
154 | } |
||
155 |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.