1 | <?php |
||
5 | class Xml |
||
6 | { |
||
7 | /** |
||
8 | * @param string $xmlString |
||
9 | * |
||
10 | * @return string |
||
11 | */ |
||
12 | public static function formatString($xmlString) |
||
22 | |||
23 | /** |
||
24 | * @param \SimpleXMLElement $xml |
||
25 | * @param string $path |
||
26 | * |
||
27 | * @return \SimpleXMLElement|\SimpleXMLElement[] |
||
28 | * |
||
29 | * @link https://github.com/astorm/pestle |
||
30 | * @copyright Pulse Storm LLC, Alan Storm |
||
31 | * |
||
32 | * @throws \Exception |
||
33 | */ |
||
34 | public static function addSimpleXmlNodesByXPath(\SimpleXMLElement $xml, $path) |
||
83 | |||
84 | /** |
||
85 | * @param \SimpleXMLElement $xml |
||
86 | * @param string $prefix |
||
87 | * @return string |
||
88 | * @throws \Exception |
||
89 | * |
||
90 | * @link https://github.com/astorm/pestle |
||
91 | * @copyright Pulse Storm LLC, Alan Storm |
||
92 | */ |
||
93 | public static function getXmlNamespaceFromPrefix(\SimpleXMLElement $xml, $prefix) |
||
103 | } |
||
104 |
This checks looks for assignemnts to variables using the
list(...)
function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$a
and$c
are used. There was no need to assign$b
.Instead, the list call could have been.