Completed
Push — AUTOMATED_TESTING ( 263a75...9a3504 )
by Gordon
13:31 queued 01:26
created
code/MapAPI.php 2 patches
Doc Comments   +28 added lines, -22 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 *
164 164
 	 * @param string  $googleMapKey the googleMapKey
165 165
 	 *
166
-	 * @return void
166
+	 * @return MapAPI
167 167
 	 */
168 168
 
169 169
 	public function setKey($googleMapKey) {
@@ -171,6 +171,9 @@  discard block
 block discarded – undo
171 171
 		return $this;
172 172
 	}
173 173
 
174
+	/**
175
+	 * @param boolean $inclusion
176
+	 */
174 177
 	public function setIncludeDownloadJavascript($inclusion) {
175 178
 		self::$include_download_javascript = $inclusion;
176 179
 		return $this;
@@ -207,7 +210,7 @@  discard block
 block discarded – undo
207 210
 	 * @param int     $gridSize         grid size
208 211
 	 * @param int     $maxZoom 			max zoom to cluster at
209 212
 	 *
210
-	 * @return void
213
+	 * @return MapAPI
211 214
 	 */
212 215
 
213 216
 	public function setClusterer($useClusterer, $gridSize=50, $maxZoom=17,
@@ -224,7 +227,7 @@  discard block
 block discarded – undo
224 227
 	 *
225 228
 	 * @param string  $googleMapId the google div ID
226 229
 	 *
227
-	 * @return void
230
+	 * @return MapAPI
228 231
 	 */
229 232
 
230 233
 	public function setDivId($googleMapId) {
@@ -237,7 +240,7 @@  discard block
 block discarded – undo
237 240
 	 *
238 241
 	 * @param string  $googleMapDirectionId GoogleMap  Direction ID for the HTML DIV
239 242
 	 *
240
-	 * @return void
243
+	 * @return MapAPI
241 244
 	 */
242 245
 
243 246
 	public function setDirectionDivId($googleMapDirectionId) {
@@ -252,7 +255,7 @@  discard block
 block discarded – undo
252 255
 	 * @param int     $width  GoogleMap  width
253 256
 	 * @param int     $height GoogleMap  height
254 257
 	 *
255
-	 * @return void
258
+	 * @return MapAPI
256 259
 	 */
257 260
 
258 261
 	public function setSize($width, $height) {
@@ -268,7 +271,7 @@  discard block
 block discarded – undo
268 271
 	 * @param int     $iconWidth  GoogleMap  marker icon width
269 272
 	 * @param int     $iconHeight GoogleMap  marker icon height
270 273
 	 *
271
-	 * @return void
274
+	 * @return MapAPI
272 275
 	 */
273 276
 
274 277
 	public function setIconSize($iconWidth, $iconHeight) {
@@ -282,7 +285,7 @@  discard block
 block discarded – undo
282 285
 	 *
283 286
 	 * @param string  $lang GoogleMap  lang : fr,en,..
284 287
 	 *
285
-	 * @return void
288
+	 * @return MapAPI
286 289
 	 */
287 290
 
288 291
 	public function setLang($lang) {
@@ -295,7 +298,7 @@  discard block
 block discarded – undo
295 298
 	 *
296 299
 	 * @param int $zoom GoogleMap zoom.
297 300
 	 *
298
-	 * @return void
301
+	 * @return MapAPI
299 302
 	 */
300 303
 
301 304
 	public function setZoom($zoom) {
@@ -308,7 +311,7 @@  discard block
 block discarded – undo
308 311
 	 *
309 312
 	 * @param int 	$infoWindowZoom GoogleMap information window zoom.
310 313
 	 *
311
-	 * @return void
314
+	 * @return MapAPI
312 315
 	 */
313 316
 
314 317
 	public function setInfoWindowZoom($infoWindowZoom) {
@@ -319,9 +322,8 @@  discard block
 block discarded – undo
319 322
 	/**
320 323
 	 * Enable the zoom on the marker when you click on it
321 324
 	 *
322
-	 * @param int     $zoom GoogleMap  zoom.
323 325
 	 *
324
-	 * @return void
326
+	 * @return MapAPI
325 327
 	 */
326 328
 
327 329
 	public function setEnableWindowZoom($enableWindowZoom) {
@@ -332,9 +334,9 @@  discard block
 block discarded – undo
332 334
 	/**
333 335
 	 * Enable theautomatic center/zoom at the gmap load
334 336
 	 *
335
-	 * @param int     $zoom GoogleMap  zoom.
336 337
 	 *
337
-	 * @return void
338
+	 * @param boolean $enableAutomaticCenterZoom
339
+	 * @return MapAPI
338 340
 	 */
339 341
 
340 342
 	public function setEnableAutomaticCenterZoom($enableAutomaticCenterZoom) {
@@ -347,7 +349,7 @@  discard block
 block discarded – undo
347 349
 	 *
348 350
 	 * @param string  $center GoogleMap  center (an address)
349 351
 	 *
350
-	 * @return void
352
+	 * @return MapAPI
351 353
 	 */
352 354
 
353 355
 	public function setCenter($center) {
@@ -362,7 +364,7 @@  discard block
 block discarded – undo
362 364
 	 *
363 365
 	 * @param string  $mapType  Can be one of road,satellite,hybrid or terrain. Defaults to road
364 366
 	 *
365
-	 * @return void
367
+	 * @return MapAPI
366 368
 	 */
367 369
 
368 370
 	public function setMapType($mapType) {
@@ -408,7 +410,7 @@  discard block
 block discarded – undo
408 410
 	 *
409 411
 	 * @param boolean $displayDirectionFields display directions or not in the info window
410 412
 	 *
411
-	 * @return void
413
+	 * @return MapAPI
412 414
 	 */
413 415
 
414 416
 	public function setDisplayDirectionFields($displayDirectionFields) {
@@ -421,7 +423,7 @@  discard block
 block discarded – undo
421 423
 	 *
422 424
 	 * @param boolean $defaultHideMarker hide all the markers on the map by default
423 425
 	 *
424
-	 * @return void
426
+	 * @return MapAPI
425 427
 	 */
426 428
 
427 429
 	public function setDefaultHideMarker($defaultHideMarker) {
@@ -505,7 +507,7 @@  discard block
 block discarded – undo
505 507
 	 * @param string  $category marker category
506 508
 	 * @param string  $icon     an icon url
507 509
 	 *
508
-	 * @return void
510
+	 * @return MapAPI
509 511
 	 */
510 512
 
511 513
 	public function addMarkerByCoords($lat, $lng, $html='', $category='', $icon='') {
@@ -529,7 +531,7 @@  discard block
 block discarded – undo
529 531
 	 * @param string  $category marker category
530 532
 	 * @param string  $icon     an icon url
531 533
 	 *
532
-	 * @return void
534
+	 * @return MapAPI
533 535
 	 */
534 536
 
535 537
 	public function addMarkerByAddress($address, $content='', $category='', $icon='') {
@@ -549,7 +551,7 @@  discard block
 block discarded – undo
549 551
 	 * @param string  $category marker category
550 552
 	 * @param string  $icon     an icon url
551 553
 	 *
552
-	 * @return void
554
+	 * @return MapAPI
553 555
 	 */
554 556
 
555 557
 	public function addArrayMarkerByCoords($coordtab, $category='', $icon='') {
@@ -631,7 +633,7 @@  discard block
 block discarded – undo
631 633
 	 * @param string  $category marker category
632 634
 	 * @param string  $icon     an icon url
633 635
 	 *
634
-	 * @return void
636
+	 * @return MapAPI
635 637
 	 */
636 638
 
637 639
 	public function addArrayMarkerByAddress($coordtab, $category='', $icon='') {
@@ -660,7 +662,7 @@  discard block
 block discarded – undo
660 662
 	 *
661 663
 	 * @param string  $url      url of the kml file compatible with gmap and gearth
662 664
 	 *
663
-	 * @return void
665
+	 * @return MapAPI
664 666
 	 */
665 667
 
666 668
 	public function addKML($url) {
@@ -820,6 +822,10 @@  discard block
 block discarded – undo
820 822
 		return $result;
821 823
 	}
822 824
 
825
+	/**
826
+	 * @param string $templateName
827
+	 * @param ArrayData $templateVariables
828
+	 */
823 829
 	function processTemplateHTML($templateName, $templateVariables = null ) {
824 830
 		if (!$templateVariables) {
825 831
 			$templateVariables = new ArrayList();
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 * @param string  $googleMapKey the googleMapKey
155 155
 	 */
156 156
 
157
-	public function __construct($googleMapKey='') {
157
+	public function __construct($googleMapKey = '') {
158 158
 		$this->googleMapKey = $googleMapKey;
159 159
 	}
160 160
 
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 	 * @return void
211 211
 	 */
212 212
 
213
-	public function setClusterer($useClusterer, $gridSize=50, $maxZoom=17,
214
-		$clustererLibraryPath='/mappable/javascript/google/markerclusterer.js') {
213
+	public function setClusterer($useClusterer, $gridSize = 50, $maxZoom = 17,
214
+		$clustererLibraryPath = '/mappable/javascript/google/markerclusterer.js') {
215 215
 		$this->useClusterer = $useClusterer;
216 216
 		$this->gridSize = $gridSize;
217 217
 		$this->maxZoom = $maxZoom;
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 	 * @return void
509 509
 	 */
510 510
 
511
-	public function addMarkerByCoords($lat, $lng, $html='', $category='', $icon='') {
511
+	public function addMarkerByCoords($lat, $lng, $html = '', $category = '', $icon = '') {
512 512
 		$m = array(
513 513
 			'latitude' => $lat,
514 514
 			'longitude' => $lng,
@@ -532,9 +532,9 @@  discard block
 block discarded – undo
532 532
 	 * @return void
533 533
 	 */
534 534
 
535
-	public function addMarkerByAddress($address, $content='', $category='', $icon='') {
535
+	public function addMarkerByAddress($address, $content = '', $category = '', $icon = '') {
536 536
 		$point = $this->geocoding($address);
537
-		if ($point!==null) {
537
+		if ($point !== null) {
538 538
 			$this->addMarkerByCoords($point[2], $point[3], $content, $category, $icon);
539 539
 		} else {
540 540
 			// throw new Exception('Adress not found : '.$address);
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 	 * @return void
553 553
 	 */
554 554
 
555
-	public function addArrayMarkerByCoords($coordtab, $category='', $icon='') {
555
+	public function addArrayMarkerByCoords($coordtab, $category = '', $icon = '') {
556 556
 		foreach ($coordtab as $coord) {
557 557
 			$this->addMarkerByCoords($coord[0], $coord[1], $coord[2], $category, $icon);
558 558
 		}
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 	 * @return void
635 635
 	 */
636 636
 
637
-	public function addArrayMarkerByAddress($coordtab, $category='', $icon='') {
637
+	public function addArrayMarkerByAddress($coordtab, $category = '', $icon = '') {
638 638
 		foreach ($coordtab as $coord) {
639 639
 			$this->addMarkerByAddress($coord[0], $coord[1], $category, $icon);
640 640
 		}
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
 	 * @return void
652 652
 	 */
653 653
 
654
-	public function addDirection($from, $to, $idpanel='') {
654
+	public function addDirection($from, $to, $idpanel = '') {
655 655
 		$this->contentMarker .= 'addDirection("'.$from.'","'.$to.'","'.$idpanel.'");';
656 656
 	}
657 657
 
@@ -715,9 +715,9 @@  discard block
 block discarded – undo
715 715
 			$linesJson = stripslashes($this->jsonRemoveUnicodeSequences($this->lines));
716 716
 			$kmlJson = stripslashes($this->jsonRemoveUnicodeSequences($this->kmlFiles));
717 717
 		} else {
718
-			$jsonMarkers = stripslashes(json_encode($this->markers,JSON_UNESCAPED_UNICODE));
719
-			$linesJson = stripslashes(json_encode($this->lines,JSON_UNESCAPED_UNICODE));
720
-			$kmlJson = stripslashes(json_encode($this->kmlFiles,JSON_UNESCAPED_UNICODE));
718
+			$jsonMarkers = stripslashes(json_encode($this->markers, JSON_UNESCAPED_UNICODE));
719
+			$linesJson = stripslashes(json_encode($this->lines, JSON_UNESCAPED_UNICODE));
720
+			$kmlJson = stripslashes(json_encode($this->kmlFiles, JSON_UNESCAPED_UNICODE));
721 721
 		}
722 722
 
723 723
 
@@ -727,8 +727,8 @@  discard block
 block discarded – undo
727 727
 							$this->latLongCenter : $this->geocoding($this->center);
728 728
 
729 729
 		// coordinates for centre depending on which method used
730
-		if ($geocodeCentre[0]=="200") { // success
731
-			$latlngCentre = array('lat'=>$geocodeCentre[2],'lng' => $geocodeCentre[3]);
730
+		if ($geocodeCentre[0] == "200") { // success
731
+			$latlngCentre = array('lat'=>$geocodeCentre[2], 'lng' => $geocodeCentre[3]);
732 732
 		} else { // Paris
733 733
 			$latlngCentre = array('lat'=>48.8792, 'lng' => 2.34778);
734 734
 		}
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 		return $result;
821 821
 	}
822 822
 
823
-	function processTemplateHTML($templateName, $templateVariables = null ) {
823
+	function processTemplateHTML($templateName, $templateVariables = null) {
824 824
 		if (!$templateVariables) {
825 825
 			$templateVariables = new ArrayList();
826 826
 		}
Please login to merge, or discard this patch.
code/LatLongField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@
 block discarded – undo
89 89
 			// the item currently has no location
90 90
 			$attributes['data-useMapBounds'] = true;
91 91
 		}
92
-		$content = '<div class="editableMapWrapper">' . $this->create_tag(
92
+		$content = '<div class="editableMapWrapper">'.$this->create_tag(
93 93
 			"div",
94 94
 			$attributes
95
-	   ) . '</div>';
95
+	   ).'</div>';
96 96
 
97 97
 		$this->FieldList()->push(new LiteralField('locationEditor', $content));
98 98
 
Please login to merge, or discard this patch.