Completed
Push — master ( baa1fe...14925d )
by Yannick
164:26 queued 132:19
created
require/class.Source.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -110,6 +110,12 @@  discard block
 block discarded – undo
110 110
 		return $all;
111 111
 	}
112 112
 
113
+	/**
114
+	 * @param string $name
115
+	 * @param string $city
116
+	 * @param string $country
117
+	 * @param string $source
118
+	 */
113 119
 	public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '', $description = '') {
114 120
 		if ($last_seen == '') $last_seen = date('Y-m-d H:i:s');
115 121
 		$query = "INSERT INTO source_location (name,latitude,longitude,altitude,country,city,logo,source,type,source_id,last_seen,location_id,description) VALUES (:name,:latitude,:longitude,:altitude,:country,:city,:logo,:source,:type,:source_id,:last_seen,:location_id,:description)";
@@ -168,6 +174,9 @@  discard block
 block discarded – undo
168 174
 		}
169 175
 	}
170 176
 
177
+	/**
178
+	 * @param string $type
179
+	 */
171 180
 	public function deleteLocationByType($type) {
172 181
 		$query = "DELETE FROM source_location WHERE type = :type";
173 182
 		$query_values = array(':type' => $type);
Please login to merge, or discard this patch.
require/class.Connection.php 1 patch
Doc Comments   +20 added lines patch added patch discarded remove patch
@@ -6,6 +6,9 @@  discard block
 block discarded – undo
6 6
 	public $dbs = array();
7 7
 	public $latest_schema = 47;
8 8
 
9
+	/**
10
+	 * @param string $dbname
11
+	 */
9 12
 	public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) {
10 13
 		global $globalNoDB;
11 14
 		if (isset($globalNoDB) && $globalNoDB === TRUE) {
@@ -142,6 +145,9 @@  discard block
 block discarded – undo
142 145
 		return true;
143 146
 	}
144 147
 
148
+	/**
149
+	 * @param string $table
150
+	 */
145 151
 	public function tableExists($table)
146 152
 	{
147 153
 		global $globalDBdriver, $globalDBname;
@@ -192,6 +198,11 @@  discard block
 block discarded – undo
192 198
 	/*
193 199
 	* Check if index exist
194 200
 	*/
201
+
202
+	/**
203
+	 * @param string $table
204
+	 * @param string $index
205
+	 */
195 206
 	public function indexExists($table,$index)
196 207
 	{
197 208
 		global $globalDBdriver, $globalDBname;
@@ -234,6 +245,10 @@  discard block
 block discarded – undo
234 245
 		return $columns;
235 246
 	}
236 247
 
248
+	/**
249
+	 * @param string $table
250
+	 * @param string $column
251
+	 */
237 252
 	public function getColumnType($table,$column) {
238 253
 		$select = $this->db->query('SELECT '.$column.' FROM '.$table);
239 254
 		$tomet = $select->getColumnMeta(0);
@@ -244,6 +259,11 @@  discard block
 block discarded – undo
244 259
 	* Check if a column name exist in a table
245 260
 	* @return Boolean column exist or not
246 261
 	*/
262
+
263
+	/**
264
+	 * @param string $table
265
+	 * @param string $name
266
+	 */
247 267
 	public function checkColumnName($table,$name)
248 268
 	{
249 269
 		global $globalDBdriver, $globalDBname;
Please login to merge, or discard this patch.
require/class.Marine.php 1 patch
Doc Comments   +3 added lines, -21 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 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
 	
20 20
 	public function getFilter($filter = array(),$where = false,$and = false) {
@@ -584,25 +584,6 @@  discard block
 block discarded – undo
584 584
 	*
585 585
 	* @param String $fammarine_id the ID
586 586
 	* @param String $ident the marine ident
587
-	* @param String $departure_airport_icao the departure airport
588
-	* @param String $arrival_airport_icao the arrival airport
589
-	* @param String $latitude latitude of flight
590
-	* @param String $longitude latitude of flight
591
-	* @param String $waypoints waypoints of flight
592
-	* @param String $heading heading of flight
593
-	* @param String $groundspeed speed of flight
594
-	* @param String $date date of flight
595
-	* @param String $departure_airport_time departure time of flight
596
-	* @param String $arrival_airport_time arrival time of flight
597
-	* @param String $squawk squawk code of flight
598
-	* @param String $route_stop route stop of flight
599
-	* @param String $highlight highlight or not
600
-	* @param String $ModeS ModesS code of flight
601
-	* @param String $registration registration code of flight
602
-	* @param String $pilot_id pilot id of flight (for virtual airlines)
603
-	* @param String $pilot_name pilot name of flight (for virtual airlines)
604
-	* @param String $verticalrate vertival rate of flight
605
-	* @return String success or false
606 587
 	*/
607 588
 	public function addMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $heading = '', $groundspeed = '', $date = '', $mmsi = '',$type = '',$typeid = '',$imo = '',$callsign = '',$arrival_code = '',$arrival_date = '',$status = '',$statusid = '',$format_source = '', $source_name = '')
608 589
 	{
@@ -1195,6 +1176,7 @@  discard block
 block discarded – undo
1195 1176
 	/**
1196 1177
 	* Counts all hours
1197 1178
 	*
1179
+	* @param string $orderby
1198 1180
 	* @return Array the hour list
1199 1181
 	*
1200 1182
 	*/
@@ -1546,7 +1528,7 @@  discard block
 block discarded – undo
1546 1528
 	/**
1547 1529
 	* Parses the direction degrees to working
1548 1530
 	*
1549
-	* @param Float $direction the direction in degrees
1531
+	* @param integer $direction the direction in degrees
1550 1532
 	* @return Array the direction information
1551 1533
 	*
1552 1534
 	*/
Please login to merge, or discard this patch.
require/class.Stats.php 1 patch
Doc Comments   +51 added lines patch added patch discarded remove patch
@@ -21,6 +21,10 @@  discard block
 block discarded – undo
21 21
 		if ($this->db === null) die('Error: No DB connection. (Stats)');
22 22
 	}
23 23
 
24
+	/**
25
+	 * @param string $type
26
+	 * @param string $stats_date
27
+	 */
24 28
 	public function addLastStatsUpdate($type,$stats_date) {
25 29
 		$query = "DELETE FROM config WHERE name = :type;
26 30
 			    INSERT INTO config (name,value) VALUES (:type,:stats_date);";
@@ -1415,6 +1419,10 @@  discard block
 block discarded – undo
1415 1419
 		$all = $sth->fetchAll(PDO::FETCH_ASSOC);
1416 1420
 		return $all;
1417 1421
 	}
1422
+
1423
+	/**
1424
+	 * @param string $type
1425
+	 */
1418 1426
 	public function deleteStatsByType($type,$stats_airline = '', $filter_name = '') {
1419 1427
 		if ($filter_name == '') $filter_name = $this->filter_name;
1420 1428
 		$query = "DELETE FROM stats WHERE stats_type = :type AND stats_airline = :stats_airline AND filter_name = :filter_name";
@@ -1426,6 +1434,11 @@  discard block
 block discarded – undo
1426 1434
 			echo "error : ".$e->getMessage();
1427 1435
 		}
1428 1436
 	}
1437
+
1438
+	/**
1439
+	 * @param string $type
1440
+	 * @param string $year
1441
+	 */
1429 1442
 	public function getSumStats($type,$year,$stats_airline = '',$filter_name = '',$month = '') {
1430 1443
 		if ($filter_name == '') $filter_name = $this->filter_name;
1431 1444
 		global $globalArchiveMonths, $globalDBdriver;
@@ -1625,6 +1638,10 @@  discard block
 block discarded – undo
1625 1638
 		else return 0;
1626 1639
 	}
1627 1640
 
1641
+	/**
1642
+	 * @param string $type
1643
+	 * @param string $stats_date
1644
+	 */
1628 1645
 	public function addStat($type,$cnt,$stats_date,$stats_airline = '',$filter_name = '') {
1629 1646
 		global $globalDBdriver;
1630 1647
 		if ($filter_name == '') $filter_name = $this->filter_name;
@@ -1678,6 +1695,9 @@  discard block
 block discarded – undo
1678 1695
         }
1679 1696
         */
1680 1697
 
1698
+	/**
1699
+	 * @param string $stats_type
1700
+	 */
1681 1701
 	public function getStatsSource($stats_type,$year = '',$month = '',$day = '') {
1682 1702
 		global $globalDBdriver;
1683 1703
 		$query = "SELECT * FROM stats_source WHERE stats_type = :stats_type";
@@ -1721,6 +1741,9 @@  discard block
 block discarded – undo
1721 1741
 		return $all;
1722 1742
 	}
1723 1743
 
1744
+	/**
1745
+	 * @param string $stats_type
1746
+	 */
1724 1747
 	public function addStatSource($data,$source_name,$stats_type,$date) {
1725 1748
 		global $globalDBdriver;
1726 1749
 		if ($globalDBdriver == 'mysql') {
@@ -1736,6 +1759,10 @@  discard block
 block discarded – undo
1736 1759
 			return "error : ".$e->getMessage();
1737 1760
 		}
1738 1761
 	}
1762
+
1763
+	/**
1764
+	 * @param string $type
1765
+	 */
1739 1766
 	public function addStatFlight($type,$date_name,$cnt,$stats_airline = '',$filter_name = '') {
1740 1767
 		$query = "INSERT INTO stats_flight (stats_type,flight_date,cnt,stats_airline,filter_name) VALUES (:type,:flight_date,:cnt,:stats_airline,:filter_name)";
1741 1768
 		$query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt, ':stats_airline' => $stats_airline,':filter_name' => $filter_name);
@@ -1746,6 +1773,10 @@  discard block
 block discarded – undo
1746 1773
 			return "error : ".$e->getMessage();
1747 1774
 		}
1748 1775
 	}
1776
+
1777
+	/**
1778
+	 * @param string $type
1779
+	 */
1749 1780
 	public function addStatMarine($type,$date_name,$cnt,$filter_name = '') {
1750 1781
 		$query = "INSERT INTO stats_marine (stats_type,marine_date,cnt,filter_name) VALUES (:type,:flight_date,:cnt,:filter_name)";
1751 1782
 		$query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt,':filter_name' => $filter_name);
@@ -1756,6 +1787,10 @@  discard block
 block discarded – undo
1756 1787
 			return "error : ".$e->getMessage();
1757 1788
 		}
1758 1789
 	}
1790
+
1791
+	/**
1792
+	 * @param string $type
1793
+	 */
1759 1794
 	public function addStatTracker($type,$date_name,$cnt,$filter_name = '') {
1760 1795
 		$query = "INSERT INTO stats_tracker (stats_type,tracker_date,cnt,filter_name) VALUES (:type,:flight_date,:cnt,:filter_name)";
1761 1796
 		$query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt,':filter_name' => $filter_name);
@@ -2068,6 +2103,10 @@  discard block
 block discarded – undo
2068 2103
 			return "error : ".$e->getMessage();
2069 2104
 		}
2070 2105
 	}
2106
+
2107
+	/**
2108
+	 * @param string $type
2109
+	 */
2071 2110
 	public function deleteStatFlight($type) {
2072 2111
 		$query = "DELETE FROM stats_flight WHERE stats_type = :type";
2073 2112
 		$query_values = array(':type' => $type);
@@ -2078,6 +2117,10 @@  discard block
 block discarded – undo
2078 2117
 			return "error : ".$e->getMessage();
2079 2118
 		}
2080 2119
 	}
2120
+
2121
+	/**
2122
+	 * @param string $type
2123
+	 */
2081 2124
 	public function deleteStatMarine($type) {
2082 2125
 		$query = "DELETE FROM stats_marine WHERE stats_type = :type";
2083 2126
 		$query_values = array(':type' => $type);
@@ -2088,6 +2131,10 @@  discard block
 block discarded – undo
2088 2131
 			return "error : ".$e->getMessage();
2089 2132
 		}
2090 2133
 	}
2134
+
2135
+	/**
2136
+	 * @param string $type
2137
+	 */
2091 2138
 	public function deleteStatTracker($type) {
2092 2139
 		$query = "DELETE FROM stats_tracker WHERE stats_type = :type";
2093 2140
 		$query_values = array(':type' => $type);
@@ -2098,6 +2145,10 @@  discard block
 block discarded – undo
2098 2145
 			return "error : ".$e->getMessage();
2099 2146
 		}
2100 2147
 	}
2148
+
2149
+	/**
2150
+	 * @param string $type
2151
+	 */
2101 2152
 	public function deleteStatAirport($type) {
2102 2153
 		$query = "DELETE FROM stats_airport WHERE stats_type = :type";
2103 2154
 		$query_values = array(':type' => $type);
Please login to merge, or discard this patch.
require/class.Tracker.php 1 patch
Doc Comments   +3 added lines, -32 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	/**
17 17
 	* Get SQL query part for filter used
18 18
 	* @param Array $filter the filter
19
-	* @return Array the SQL part
19
+	* @return string the SQL part
20 20
 	*/
21 21
 	
22 22
 	public function getFilter($filter = array(),$where = false,$and = false) {
@@ -487,9 +487,6 @@  discard block
 block discarded – undo
487 487
 	/**
488 488
 	* Update ident tracker data
489 489
 	*
490
-	* @param String $flightaware_id the ID from flightaware
491
-	* @param String $ident the flight ident
492
-	* @return String success or false
493 490
 	*
494 491
 	*/	
495 492
 	public function updateIdentTrackerData($famtrackid = '', $ident = '',$fromsource = NULL)
@@ -511,10 +508,6 @@  discard block
 block discarded – undo
511 508
 	/**
512 509
 	* Update latest tracker data
513 510
 	*
514
-	* @param String $flightaware_id the ID from flightaware
515
-	* @param String $ident the flight ident
516
-	* @param String $arrival_airport_icao the arrival airport
517
-	* @return String success or false
518 511
 	*
519 512
 	*/	
520 513
 	public function updateLatestTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $groundspeed = NULL, $date = '')
@@ -536,29 +529,6 @@  discard block
 block discarded – undo
536 529
 	/**
537 530
 	* Adds a new tracker data
538 531
 	*
539
-	* @param String $flightaware_id the ID from flightaware
540
-	* @param String $ident the flight ident
541
-	* @param String $aircraft_icao the aircraft type
542
-	* @param String $departure_airport_icao the departure airport
543
-	* @param String $arrival_airport_icao the arrival airport
544
-	* @param String $latitude latitude of flight
545
-	* @param String $longitude latitude of flight
546
-	* @param String $waypoints waypoints of flight
547
-	* @param String $altitude altitude of flight
548
-	* @param String $heading heading of flight
549
-	* @param String $groundspeed speed of flight
550
-	* @param String $date date of flight
551
-	* @param String $departure_airport_time departure time of flight
552
-	* @param String $arrival_airport_time arrival time of flight
553
-	* @param String $squawk squawk code of flight
554
-	* @param String $route_stop route stop of flight
555
-	* @param String $highlight highlight or not
556
-	* @param String $ModeS ModesS code of flight
557
-	* @param String $registration registration code of flight
558
-	* @param String $pilot_id pilot id of flight (for virtual airlines)
559
-	* @param String $pilot_name pilot name of flight (for virtual airlines)
560
-	* @param String $verticalrate vertival rate of flight
561
-	* @return String success or false
562 532
 	*/
563 533
 	public function addTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $comment = '', $type = '',$format_source = '', $source_name = '')
564 534
 	{
@@ -1132,6 +1102,7 @@  discard block
 block discarded – undo
1132 1102
 	/**
1133 1103
 	* Counts all hours
1134 1104
 	*
1105
+	* @param string $orderby
1135 1106
 	* @return Array the hour list
1136 1107
 	*
1137 1108
 	*/
@@ -1483,7 +1454,7 @@  discard block
 block discarded – undo
1483 1454
 	/**
1484 1455
 	* Parses the direction degrees to working
1485 1456
 	*
1486
-	* @param Float $direction the direction in degrees
1457
+	* @param integer $direction the direction in degrees
1487 1458
 	* @return Array the direction information
1488 1459
 	*
1489 1460
 	*/
Please login to merge, or discard this patch.