@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | { |
17 | 17 | $this->xmlParser = $xmlParser; |
18 | 18 | |
19 | - if($xmlParser === null) { |
|
19 | + if ($xmlParser === null) { |
|
20 | 20 | $this->xmlParser = new XmlParser(); |
21 | 21 | } |
22 | 22 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | // Process each alert ("ENTRY") |
31 | 31 | $resultArray = array(); |
32 | 32 | |
33 | - foreach($alertDataArray as $alert) { |
|
33 | + foreach ($alertDataArray as $alert) { |
|
34 | 34 | if (!$this->isAlert($alert)) { |
35 | 35 | continue; |
36 | 36 | } |
@@ -80,17 +80,17 @@ discard block |
||
80 | 80 | ); |
81 | 81 | |
82 | 82 | // Loop through attributes and set values |
83 | - foreach($alert['children'] as $element){ |
|
83 | + foreach ($alert['children'] as $element) { |
|
84 | 84 | $elementName = $element['name']; |
85 | 85 | $elementAttrs = $element['attrs']; |
86 | - if(isset($element['tagData'])){ |
|
86 | + if (isset($element['tagData'])) { |
|
87 | 87 | $elementData = $element['tagData']; |
88 | 88 | } else { |
89 | 89 | $elementData = ''; |
90 | 90 | } |
91 | 91 | |
92 | 92 | |
93 | - switch($elementName){ |
|
93 | + switch ($elementName) { |
|
94 | 94 | case 'ID': |
95 | 95 | $parsedAlert['idString'] = $elementData; |
96 | 96 | break; |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | $geoArray = array(); |
157 | 157 | |
158 | 158 | // parse into simple array |
159 | - foreach($element['children'] as $geo) { |
|
160 | - if(isset($geo['tagData'])) { |
|
159 | + foreach ($element['children'] as $geo) { |
|
160 | + if (isset($geo['tagData'])) { |
|
161 | 161 | $geoArray[] = $geo['tagData']; |
162 | 162 | } |
163 | 163 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | break; |
169 | 169 | case 'CAP:PARAMETERS': |
170 | 170 | $paramArray = array(); |
171 | - foreach($element['children'] as $param){ |
|
171 | + foreach ($element['children'] as $param) { |
|
172 | 172 | $paramArray[] = $param['tagData']; |
173 | 173 | } |
174 | 174 | $parsedAlert['capParameters'] = implode(', ', $paramArray); |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | $currentLocationKey = 'null'; |
198 | 198 | $geoLocArray = array(); |
199 | 199 | |
200 | - foreach($geoArray as $geoLoc) { |
|
201 | - if(in_array($geoLoc, $locationFormatTypes)) { |
|
200 | + foreach ($geoArray as $geoLoc) { |
|
201 | + if (in_array($geoLoc, $locationFormatTypes)) { |
|
202 | 202 | $currentLocationKey = $geoLoc; |
203 | 203 | $geoLocArray[$geoLoc] = array(); |
204 | 204 | } else { |