@@ -41,19 +41,19 @@ discard block |
||
41 | 41 | { |
42 | 42 | $xml_string = (string) $xml; |
43 | 43 | |
44 | - if($xml->count() == 0 and $xml_string != '') { |
|
45 | - if(count($xml->attributes()) == 0){ |
|
44 | + if ($xml->count() == 0 and $xml_string != '') { |
|
45 | + if (count($xml->attributes()) == 0) { |
|
46 | 46 | $result = $xml_string; |
47 | - }else{ |
|
47 | + } else { |
|
48 | 48 | $result = array($xml_string); |
49 | 49 | } |
50 | - }else{ |
|
50 | + } else { |
|
51 | 51 | $result = null; |
52 | 52 | } |
53 | 53 | |
54 | 54 | foreach ($ns as $nsName => $nsUri) { |
55 | 55 | foreach ($xml->attributes($nsUri) as $attName => $attValue) { |
56 | - if ( ! empty($nsName)) { |
|
56 | + if (!empty($nsName)) { |
|
57 | 57 | $attName = "{$nsName}:{$attName}"; |
58 | 58 | } |
59 | 59 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | foreach ($xml->children($nsUri) as $childName => $child) { |
64 | - if ( ! empty($nsName)) { |
|
64 | + if (!empty($nsName)) { |
|
65 | 65 | $childName = "{$nsName}:{$childName}"; |
66 | 66 | } |
67 | 67 |
@@ -44,10 +44,10 @@ |
||
44 | 44 | if($xml->count() == 0 and $xml_string != '') { |
45 | 45 | if(count($xml->attributes()) == 0){ |
46 | 46 | $result = $xml_string; |
47 | - }else{ |
|
47 | + } else{ |
|
48 | 48 | $result = array($xml_string); |
49 | 49 | } |
50 | - }else{ |
|
50 | + } else{ |
|
51 | 51 | $result = null; |
52 | 52 | } |
53 | 53 |