Code Duplication    Length = 12-12 lines in 3 locations

airport-data.php 1 location

@@ 81-92 (lines=12) @@
78
    print '<i>'.$metar_info[0]['metar'].'</i><br />';
79
    print '<b>'.$metar_info[0]['metar_date'].'</b><br />';
80
//    print_r($metar_parse);
81
    if (isset($metar_parse['wind'])) {
82
        print _("Wind:").' ';
83
	if (isset($metar_parse['wind']['direction'])) {
84
	    $direction = $Spotter->parseDirection($metar_parse['wind']['direction']);
85
	    print $direction[0]['direction_fullname'];
86
	    print ' ('.$metar_parse['wind']['direction'].'°) ';
87
        }
88
        if (isset($metar_parse['wind']['speed'])) {
89
	    print $metar_parse['wind']['speed'].' m/s';
90
        }
91
	print '<br/>';
92
    }
93
    if (isset($metar_parse['visibility'])) {
94
        print _("Visibility:").' '.$metar_parse['visibility'].' m'."<br/>";
95
    }

airport-detailed.php 1 location

@@ 131-142 (lines=12) @@
128
				print '<div><span class="label">METAR</span>';
129
				print $metar_info[0]['metar'].'<br />';
130
				print '<b>'.$metar_info[0]['metar_date'].'</b> ';
131
				if (isset($metar_parse['wind'])) {
132
					print _("Wind:").' ';
133
					if (isset($metar_parse['wind']['direction'])) {
134
						$direction = $Spotter->parseDirection($metar_parse['wind']['direction']);
135
						print $direction[0]['direction_fullname'];
136
						print ' ('.$metar_parse['wind']['direction'].'°) ';
137
					}
138
					if (isset($metar_parse['wind']['speed'])) {
139
						print $metar_parse['wind']['speed'].' m/s';
140
					}
141
					print ' - ';
142
				}
143
				if (isset($metar_parse['visibility'])) {
144
					print _("Visibility:").' '.$metar_parse['visibility'].' m'." - ";
145
				}

tools-metar.php 1 location

@@ 41-52 (lines=12) @@
38
			print '<b>'._("Location:").'</b> ';
39
			print $metar_parse['location']." ";
40
		}
41
		if (isset($metar_parse['wind'])) {
42
			print '<b>'._("Wind:").'</b> ';
43
			if (isset($metar_parse['wind']['direction'])) {
44
				$direction = $Spotter->parseDirection($metar_parse['wind']['direction']);
45
				print $direction[0]['direction_fullname'];
46
				print ' ('.$metar_parse['wind']['direction'].'°) ';
47
			}
48
			if (isset($metar_parse['wind']['speed'])) {
49
				print $metar_parse['wind']['speed'].' m/s';
50
			}
51
			print ' ';
52
		}
53
		if (isset($metar_parse['visibility'])) {
54
			print '<b>'._("Visibility:").'</b> '.$metar_parse['visibility'].' m'." ";
55
		}