Completed
Push — master ( e238bb...5f361c )
by Yannick
05:26
created
require/class.Stats.php 1 patch
Doc Comments   +32 added lines patch added patch discarded remove patch
@@ -13,6 +13,10 @@  discard block
 block discarded – undo
13 13
 		$this->db = $Connection->db();
14 14
         }
15 15
               
16
+	/**
17
+	 * @param string $type
18
+	 * @param string $stats_date
19
+	 */
16 20
 	public function addLastStatsUpdate($type,$stats_date) {
17 21
                 $query = "DELETE FROM config WHERE name = :type;
18 22
             		INSERT INTO config (name,value) VALUES (:type,:stats_date);";
@@ -578,6 +582,11 @@  discard block
 block discarded – undo
578 582
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
579 583
                 return $all;
580 584
         }
585
+
586
+	/**
587
+	 * @param string $type
588
+	 * @param string $year
589
+	 */
581 590
 	public function getSumStats($type,$year,$stats_airline = '') {
582 591
     		global $globalArchiveMonths, $globalDBdriver;
583 592
     		if ($globalDBdriver == 'mysql') {
@@ -677,6 +686,10 @@  discard block
 block discarded – undo
677 686
                 return $all[0]['total'];
678 687
         }
679 688
 
689
+	/**
690
+	 * @param string $type
691
+	 * @param string $stats_date
692
+	 */
680 693
 	public function addStat($type,$cnt,$stats_date,$stats_airline = '') {
681 694
 		global $globalDBdriver;
682 695
 		if ($globalDBdriver == 'mysql') {
@@ -708,6 +721,10 @@  discard block
 block discarded – undo
708 721
                         return "error : ".$e->getMessage();
709 722
                 }
710 723
         }
724
+
725
+	/**
726
+	 * @param string $date
727
+	 */
711 728
 	public function getStatsSource($date,$stats_type = '') {
712 729
 		if ($stats_type == '') {
713 730
 			$query = "SELECT * FROM stats_source WHERE stats_date = :date ORDER BY source_name";
@@ -726,6 +743,9 @@  discard block
 block discarded – undo
726 743
                 return $all;
727 744
         }
728 745
 
746
+	/**
747
+	 * @param string $stats_type
748
+	 */
729 749
 	public function addStatSource($data,$source_name,$stats_type,$date) {
730 750
 		global $globalDBdriver;
731 751
 		if ($globalDBdriver == 'mysql') {
@@ -741,6 +761,10 @@  discard block
 block discarded – undo
741 761
                         return "error : ".$e->getMessage();
742 762
                 }
743 763
         }
764
+
765
+	/**
766
+	 * @param string $type
767
+	 */
744 768
 	public function addStatFlight($type,$date_name,$cnt,$stats_airline = '') {
745 769
                 $query = "INSERT INTO stats_flight (stats_type,flight_date,cnt,stats_airline) VALUES (:type,:flight_date,:cnt,:stats_airline)";
746 770
                 $query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt, ':stats_airline' => $stats_airline);
@@ -927,6 +951,10 @@  discard block
 block discarded – undo
927 951
                         return "error : ".$e->getMessage();
928 952
                 }
929 953
         }
954
+
955
+	/**
956
+	 * @param string $type
957
+	 */
930 958
 	public function deleteStatFlight($type) {
931 959
                 $query = "DELETE FROM stats_flight WHERE stats_type = :type";
932 960
                 $query_values = array(':type' => $type);
@@ -937,6 +965,10 @@  discard block
 block discarded – undo
937 965
                         return "error : ".$e->getMessage();
938 966
                 }
939 967
         }
968
+
969
+	/**
970
+	 * @param string $type
971
+	 */
940 972
 	public function deleteStatAirport($type) {
941 973
                 $query = "DELETE FROM stats_airport WHERE stats_type = :type";
942 974
                 $query_values = array(':type' => $type);
Please login to merge, or discard this patch.
require/class.SpotterLive.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	/**
15 15
 	* Get SQL query part for filter used
16 16
 	* @param Array $filter the filter
17
-	* @return Array the SQL part
17
+	* @return string the SQL part
18 18
 	*/
19 19
 	public function getFilter($filter = array(),$where = false,$and = false) {
20 20
 		global $globalFilter;
Please login to merge, or discard this patch.
require/class.Spotter.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	/**
16 16
 	* Get SQL query part for filter used
17 17
 	* @param Array $filter the filter
18
-	* @return Array the SQL part
18
+	* @return string the SQL part
19 19
 	*/
20 20
 	public function getFilter($filter = array(),$where = false,$and = false) {
21 21
 		global $globalFilter;
@@ -8612,6 +8612,7 @@  discard block
 block discarded – undo
8612 8612
 	/**
8613 8613
 	* Counts all hours
8614 8614
 	*
8615
+	* @param string $orderby
8615 8616
 	* @return Array the hour list
8616 8617
 	*
8617 8618
 	*/
@@ -8677,6 +8678,7 @@  discard block
 block discarded – undo
8677 8678
 	/**
8678 8679
 	* Counts all hours
8679 8680
 	*
8681
+	* @param string $orderby
8680 8682
 	* @return Array the hour list
8681 8683
 	*
8682 8684
 	*/
@@ -9501,7 +9503,7 @@  discard block
 block discarded – undo
9501 9503
 	/**
9502 9504
 	* Parses the direction degrees to working
9503 9505
 	*
9504
-	* @param Float $direction the direction in degrees
9506
+	* @param integer $direction the direction in degrees
9505 9507
 	* @return Array the direction information
9506 9508
 	*
9507 9509
 	*/
Please login to merge, or discard this patch.
require/class.NOTAM.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -1098,6 +1098,10 @@  discard block
 block discarded – undo
1098 1098
 		else return array();
1099 1099
 	}
1100 1100
 
1101
+	/**
1102
+	 * @param string $type
1103
+	 * @param string $rules
1104
+	 */
1101 1105
 	public function addNOTAM($ref,$title,$type,$fir,$code,$rules,$scope,$lower_limit,$upper_limit,$center_latitude,$center_longitude,$radius,$date_begin,$date_end,$permanent,$text,$full_notam) {
1102 1106
 		$query = "INSERT INTO notam (ref,title,notam_type,fir,code,rules,scope,lower_limit,upper_limit,center_latitude,center_longitude,radius,date_begin,date_end,permanent,notam_text,full_notam) VALUES (:ref,:title,:type,:fir,:code,:rules,:scope,:lower_limit,:upper_limit,:center_latitude,:center_longitude,:radius,:date_begin,:date_end,:permanent,:text,:full_notam)";
1103 1107
 		$query_values = array(':ref' => $ref,':title' => $title,':type' => $type,':fir' => $fir,':code' => $code,':rules' => $rules,':scope' => $scope,':lower_limit' => $lower_limit,':upper_limit' => $upper_limit,':center_latitude' => $center_latitude,':center_longitude' => $center_longitude,':radius' => $radius,':date_begin' => $date_begin,':date_end' => $date_end,':permanent' => $permanent,':text' => $text,':full_notam' => $full_notam);
@@ -1179,6 +1183,10 @@  discard block
 block discarded – undo
1179 1183
 			}
1180 1184
 		}
1181 1185
 	}
1186
+
1187
+	/**
1188
+	 * @param string $filename
1189
+	 */
1182 1190
 	public function updateNOTAMfromTextFile($filename) {
1183 1191
 		$alldata = $this->parseNOTAMtextFile($filename);
1184 1192
 		if (count($alldata) > 0) {
@@ -1223,6 +1231,9 @@  discard block
 block discarded – undo
1223 1231
 		}
1224 1232
 	}
1225 1233
 
1234
+	/**
1235
+	 * @param string $icao
1236
+	 */
1226 1237
 	public function downloadNOTAM($icao) {
1227 1238
 		date_default_timezone_set("UTC");
1228 1239
 		$Common = new Common();
@@ -1359,6 +1370,9 @@  discard block
 block discarded – undo
1359 1370
 		return $result;
1360 1371
 	}
1361 1372
 	
1373
+	/**
1374
+	 * @param string $code
1375
+	 */
1362 1376
 	public function parse_code($code) {
1363 1377
 		$code = str_split($code);
1364 1378
 		$code_fp = $code[1].$code[2];
Please login to merge, or discard this patch.
require/class.SpotterArchive.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     /**
12 12
     * Get SQL query part for filter used
13 13
     * @param Array $filter the filter
14
-    * @return Array the SQL part
14
+    * @return string the SQL part
15 15
     */
16 16
     public function getFilter($filter = array(),$where = false,$and = false) {
17 17
 	global $globalFilter, $globalStatsFilters, $globalFilterName;
Please login to merge, or discard this patch.
require/class.ATC.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     /**
12 12
     * Get SQL query part for filter used
13 13
     * @param Array $filter the filter
14
-    * @return Array the SQL part
14
+    * @return string the SQL part
15 15
     */
16 16
     public function getFilter($filter = array(),$where = false,$and = false) {
17 17
 	global $globalFilter, $globalStatsFilters, $globalFilterName;
Please login to merge, or discard this patch.
require/class.Common.php 1 patch
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,6 +79,10 @@  discard block
 block discarded – undo
79 79
 		return strlen($headerLine); // Needed by curl
80 80
 	}
81 81
 
82
+	/**
83
+	 * @param string $url
84
+	 * @param string $file
85
+	 */
82 86
 	public static function download($url, $file, $referer = '') {
83 87
 		$fp = fopen($file, 'w+');
84 88
 		$ch = curl_init();
@@ -177,7 +181,7 @@  discard block
 block discarded – undo
177 181
 	* Check is distance realistic
178 182
 	* @param int $timeDifference the time between the reception of both messages
179 183
 	* @param float $distance distance covered
180
-	* @return whether distance is realistic
184
+	* @return boolean distance is realistic
181 185
 	*/
182 186
 	public function withinThreshold ($timeDifference, $distance) {
183 187
 		$x = abs($timeDifference);
@@ -200,6 +204,9 @@  discard block
 block discarded – undo
200 204
 	}
201 205
 
202 206
 
207
+	/**
208
+	 * @param string $latlong
209
+	 */
203 210
 	public function convertDec($dms,$latlong) {
204 211
 		if ($latlong == 'latitude') {
205 212
 			$deg = substr($dms, 0, 2);
@@ -301,7 +308,7 @@  discard block
 block discarded – undo
301 308
 	/**
302 309
 	* Returns list of available locales
303 310
 	*
304
-	* @return array
311
+	* @return string[]
305 312
 	 */
306 313
 	public function listLocaleDir()
307 314
 	{
Please login to merge, or discard this patch.