@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | |
16 | 16 | private static $type_map = [ |
17 | 17 | 'Varchar' => 'string', |
18 | - 'Float' => 'decimal', // key tbc |
|
19 | - 'Datetime' => 'dateTime', // key tbc |
|
20 | - 'Int' => 'integer', // key tbc |
|
18 | + 'Float' => 'decimal', // key tbc |
|
19 | + 'Datetime' => 'dateTime', // key tbc |
|
20 | + 'Int' => 'integer', // key tbc |
|
21 | 21 | ]; |
22 | 22 | |
23 | 23 | private static $ns = 'ssgis=https://github.com/smindel/silverstripe-gis'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | list($nsName, $nsUri) = explode('=', $config['ns']); |
81 | 81 | |
82 | - $dom = new DOMDocument('1.0','UTF-8'); |
|
82 | + $dom = new DOMDocument('1.0', 'UTF-8'); |
|
83 | 83 | $schema = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'schema'); |
84 | 84 | $schema->setAttribute('elementFormDefault', 'qualified'); |
85 | 85 | $schema->setAttribute('targetNamespace', $nsUri); |
@@ -157,13 +157,13 @@ discard block |
||
157 | 157 | |
158 | 158 | list($nsName, $nsUri) = explode('=', $config['ns']); |
159 | 159 | |
160 | - $dom = new DOMDocument('1.0','UTF-8'); |
|
160 | + $dom = new DOMDocument('1.0', 'UTF-8'); |
|
161 | 161 | |
162 | 162 | $featureCollection = $dom->createElement('FeatureCollection'); |
163 | 163 | $featureCollection->setAttribute('xmlns:gml', 'http://www.opengis.net/gml'); |
164 | 164 | $featureCollection->setAttribute('xmlns:' . $nsName, $nsUri); |
165 | 165 | |
166 | - foreach($list as $item) { |
|
166 | + foreach ($list as $item) { |
|
167 | 167 | if (!$item->canView()) { |
168 | 168 | continue; |
169 | 169 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $line = $dom->createElement('gml:LineString'); |
223 | 223 | $line->setAttribute('srsName', 'urn:ogc:def:crs:EPSG::' . $gis->srid); |
224 | 224 | |
225 | - $posList = $dom->createElement('gml:posList', implode(' ', array_map(function($point){return implode(' ', $point);}, $gis->coordinates))); |
|
225 | + $posList = $dom->createElement('gml:posList', implode(' ', array_map(function($point) {return implode(' ', $point); }, $gis->coordinates))); |
|
226 | 226 | |
227 | 227 | $line->appendChild($posList); |
228 | 228 | |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | $linearRing = $dom->createElement('gml:LinearRing'); |
241 | 241 | |
242 | - $posList = $dom->createElement('gml:posList', implode(' ', array_map(function($point){return implode(' ', $point);}, $ring))); |
|
242 | + $posList = $dom->createElement('gml:posList', implode(' ', array_map(function($point) {return implode(' ', $point); }, $ring))); |
|
243 | 243 | |
244 | 244 | $linearRing->appendChild($posList); |
245 | 245 |