@@ -55,7 +55,7 @@ |
||
55 | 55 | $queryParams = array_intersect_ukey( |
56 | 56 | $request->requestVars(), |
57 | 57 | $config['searchable_fields'], |
58 | - function ($a, $b) { |
|
58 | + function($a, $b) { |
|
59 | 59 | $a = explode(':', $a)[0]; |
60 | 60 | $b = explode(':', $b)[0]; |
61 | 61 | return strcmp($a, $b); |
@@ -70,9 +70,9 @@ |
||
70 | 70 | 'coordinates' => $geometry->coordinates, |
71 | 71 | ]; |
72 | 72 | } |
73 | - $feature['geometry']['geometries'] = $geometries; |
|
73 | + $feature['geometry']['geometries'] = $geometries; |
|
74 | 74 | } else { |
75 | - $feature['geometry']['coordinates'] = $geo->coordinates; |
|
75 | + $feature['geometry']['coordinates'] = $geo->coordinates; |
|
76 | 76 | } |
77 | 77 | echo json_encode($feature); |
78 | 78 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $min = $max = null; |
113 | 113 | GIS::each( |
114 | 114 | $geo, |
115 | - function ($lonlat) use (&$min, &$max) { |
|
115 | + function($lonlat) use (&$min, &$max) { |
|
116 | 116 | $min = is_null($min) ? $lonlat[0] : min($min, $lonlat[0]); |
117 | 117 | $max = is_null($max) ? $lonlat[0] : max($max, $lonlat[0]); |
118 | 118 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | foreach ($distance as $offset => &$dist) { |
127 | 127 | $dist = GIS::each( |
128 | 128 | $geo, |
129 | - function ($lonlat) use ($offset) { |
|
129 | + function($lonlat) use ($offset) { |
|
130 | 130 | return [ |
131 | 131 | (($lonlat[0] + 180 - $offset) / 360) * $this->size * pow(2, $this->z) - $this->topLeft[0], |
132 | 132 | (0.5 - log((1 + sin($lonlat[1] * pi() / 180)) / |
@@ -78,7 +78,7 @@ |
||
78 | 78 | |
79 | 79 | if (preg_match_all('/\sBand\s*(\d+):\s*Value:\s*([\d\.\-]+)/', $output, $matches)) { |
80 | 80 | $bands = array_combine($matches[1], $matches[2]); |
81 | - array_walk($bands, function (&$item) { |
|
81 | + array_walk($bands, function(&$item) { |
|
82 | 82 | $item = (int)$item; |
83 | 83 | }); |
84 | 84 | return $bands; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | if (preg_match(self::EWKT_PATTERN, $this->value, $matches)) { |
143 | 143 | $geometries = preg_split('/,(?=[a-zA-Z])/', substr($matches[4], 1, -1)); |
144 | 144 | $srid = $this->srid; |
145 | - return array_map(function ($geometry) use ($srid) { |
|
145 | + return array_map(function($geometry) use ($srid) { |
|
146 | 146 | return GIS::create('SRID=' . $srid . ';' . $geometry); |
147 | 147 | }, $geometries); |
148 | 148 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | |
249 | 249 | protected static function reproject_array($coordinates, $fromProj, $toProj) |
250 | 250 | { |
251 | - return self::each($coordinates, function ($coordinate) use ($fromProj, $toProj) { |
|
251 | + return self::each($coordinates, function($coordinate) use ($fromProj, $toProj) { |
|
252 | 252 | return array_slice(self::$proj4->transform( |
253 | 253 | $toProj, |
254 | 254 | new Point( |
@@ -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'; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $line = $dom->createElement('gml:LineString'); |
224 | 224 | $line->setAttribute('srsName', 'urn:ogc:def:crs:EPSG::' . $gis->srid); |
225 | 225 | |
226 | - $posList = $dom->createElement('gml:posList', implode(' ', array_map(function ($point) { |
|
226 | + $posList = $dom->createElement('gml:posList', implode(' ', array_map(function($point) { |
|
227 | 227 | return implode(' ', $point); |
228 | 228 | }, $gis->coordinates))); |
229 | 229 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | $linearRing = $dom->createElement('gml:LinearRing'); |
244 | 244 | |
245 | - $posList = $dom->createElement('gml:posList', implode(' ', array_map(function ($point) { |
|
245 | + $posList = $dom->createElement('gml:posList', implode(' ', array_map(function($point) { |
|
246 | 246 | return implode(' ', $point); |
247 | 247 | }, $ring))); |
248 | 248 |