1 | <?php |
||
9 | class Response |
||
10 | { |
||
11 | /** |
||
12 | * Convert Atende xml response to stdClass |
||
13 | * @param string $xml |
||
14 | * @return stdClass |
||
15 | */ |
||
16 | public static function toStd($xml) |
||
20 | |||
21 | /** |
||
22 | * Convert Atende xml response to array |
||
23 | * @param string $xml |
||
24 | * @return array |
||
25 | */ |
||
26 | public static function toArray($xml) |
||
30 | |||
31 | /** |
||
32 | * Convert Atende xml response to json string |
||
33 | * @param string $xml |
||
34 | * @return string |
||
35 | */ |
||
36 | public static function toJson($xml) |
||
40 | |||
41 | /** |
||
42 | * Identify and convert xml |
||
43 | * @param string $xml |
||
44 | * @return string |
||
45 | */ |
||
46 | protected static function select($xml) |
||
67 | |||
68 | /** |
||
69 | * Renderize DOMElement do json string |
||
70 | * @param DOMElement $node |
||
71 | * @return string |
||
72 | */ |
||
73 | protected static function render(DOMElement $node) |
||
87 | } |
||
88 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.