Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function toString($config, $pretty = true) |
||
26 | { |
||
27 | $xml = $this->toXML($config); |
||
28 | if ($pretty == false) { |
||
|
|||
29 | return $xml; |
||
30 | } |
||
31 | |||
32 | $dom = new DOMDocument(); |
||
33 | $dom->preserveWhiteSpace = false; |
||
34 | $dom->formatOutput = true; |
||
35 | $dom->loadXML($xml); |
||
36 | |||
37 | return $dom->saveXML(); |
||
38 | } |
||
39 | |||
74 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.