Completed
Push — master ( ae4662...65be4b )
by Yannick
11:45 queued 04:47
created
polar-geojson.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 header('Content-Type: text/javascript');
18 18
 
19 19
 
20
-$polar = $Stats->getStatsSource(date('Y-m-d'),'polar');
20
+$polar = $Stats->getStatsSource(date('Y-m-d'), 'polar');
21 21
 $output = '{"type": "FeatureCollection","features": [';
22 22
 if (!empty($polar)) {
23
-	foreach($polar as $eachpolar) {
23
+	foreach ($polar as $eachpolar) {
24 24
 		$data = json_decode($eachpolar['source_data']);
25 25
 		$name = $eachpolar['source_name'];
26 26
 		$coord = $Location->getLocationInfobySourceName($name);
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
 			$initial_longitude = $globalCenterLongitude;
34 34
 		}
35 35
 		$first = '';
36
-		foreach($data as $value => $key) {
37
-			$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key);
38
-			if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']';
36
+		foreach ($data as $value => $key) {
37
+			$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude, $initial_longitude, $value*22.5, $key);
38
+			if ($first == '') $first = '['.round($final_coord['longitude'], 5).','.round($final_coord['latitude'], 5).']';
39 39
 			$output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],';
40 40
 		}
41 41
 		$output .= $first;
42 42
 		$output .= ']]}},';
43 43
 	}
44
-	$output  = substr($output, 0, -1);
44
+	$output = substr($output, 0, -1);
45 45
 }
46 46
 $output .= ']}';
47 47
 print $output;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@
 block discarded – undo
35 35
 		$first = '';
36 36
 		foreach($data as $value => $key) {
37 37
 			$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key);
38
-			if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']';
38
+			if ($first == '') {
39
+				$first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']';
40
+			}
39 41
 			$output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],';
40 42
 		}
41 43
 		$output .= $first;
Please login to merge, or discard this patch.