Code Duplication    Length = 7-7 lines in 2 locations

polar-geojson.php 1 location

@@ 30-36 (lines=7) @@
27
	$name = $eachpolar['source_name'];
28
	$coord = $Location->getLocationInfobySourceName($name);
29
        $output .= '{"type": "Feature","properties": {"name": "'.$name.'","style": {"color": "#D3FFCF", "opacity": 0.5}},"geometry": {"type": "Polygon","coordinates": [[';
30
	if (isset($coord[0]['latitude'])) {
31
		$initial_latitude = $coord[0]['latitude'];
32
		$initial_longitude = $coord[0]['longitude'];
33
	} else {
34
		$initial_latitude = $globalCenterLatitude;
35
		$initial_longitude = $globalCenterLongitude;
36
	}
37
	$first = '';
38
	foreach($data as $value => $key) {
39
		$final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key);

require/class.SpotterImport.php 1 location

@@ 796-802 (lines=7) @@
793
					if (!isset($source_location[$source])) {
794
						$Location = new Source();
795
						$coord = $Location->getLocationInfobySourceName($source);
796
						if (count($coord) > 0) {
797
							$latitude = $coord[0]['latitude'];
798
							$longitude = $coord[0]['longitude'];
799
						} else {
800
							$latitude = $globalCenterLatitude;
801
							$longitude = $globalCenterLongitude;
802
						}
803
						$source_location[$source] = array('latitude' => $latitude,'longitude' => $longitude);
804
					} else {
805
						$latitude = $source_location[$source]['latitude'];