Code Duplication    Length = 9-10 lines in 4 locations

require/class.ATC.php 1 location

@@ 52-61 (lines=10) @@
49
                }
50
        }
51
52
       public function deleteAll() {
53
                $query = "DELETE FROM atc";
54
                $query_values = array();
55
                 try {
56
                        $sth = $this->db->prepare($query);
57
                        $sth->execute($query_values);
58
                } catch(PDOException $e) {
59
                        return "error : ".$e->getMessage();
60
                }
61
        }
62
63
	public function deleteOldATC() {
64
                global $globalDBdriver;

require/class.METAR.php 1 location

@@ 313-321 (lines=9) @@
310
                        return "error : ".$e->getMessage();
311
                }
312
        }
313
       public function deleteAllMETARLocation() {
314
                $query = "DELETE FROM metar";
315
                 try {
316
                        $sth = $this->db->prepare($query);
317
                        $sth->execute();
318
                } catch(PDOException $e) {
319
                        return "error : ".$e->getMessage();
320
                }
321
        }
322
        
323
        public function addMETARCycle() {
324
    		global $globalDebug, $globalIVAO;

require/class.NOTAM.php 1 location

@@ 749-757 (lines=9) @@
746
			return "error : ".$e->getMessage();
747
		}
748
	}
749
	public function deleteAllNOTAMLocation() {
750
		$query = "DELETE FROM notam";
751
		try {
752
			$sth = $this->db->prepare($query);
753
			$sth->execute();
754
		} catch(PDOException $e) {
755
			return "error : ".$e->getMessage();
756
		}
757
	}
758
759
	public function updateNotam() {
760
		global $globalNOTAMAirports;

require/class.Source.php 1 location

@@ 69-77 (lines=9) @@
66
                        return "error : ".$e->getMessage();
67
                }
68
        }
69
       public function deleteAllLocation() {
70
                $query = "DELETE FROM source_location";
71
                 try {
72
                        $sth = $this->db->prepare($query);
73
                        $sth->execute();
74
                } catch(PDOException $e) {
75
                        return "error : ".$e->getMessage();
76
                }
77
        }
78
}
79
?>