Completed
Push — master ( 9ccc85...3105cd )
by Yannick
33:11
created
require/class.MarineLive.php 1 patch
Doc Comments   +1 added lines, -5 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, $globalStatsFilters, $globalFilterName, $globalDBdriver;
@@ -923,10 +923,6 @@  discard block
 block discarded – undo
923 923
 	*
924 924
 	* @param String $fammarine_id the ID from flightaware
925 925
 	* @param String $ident the flight ident
926
-	* @param String $aircraft_icao the aircraft type
927
-	* @param String $departure_airport_icao the departure airport
928
-	* @param String $arrival_airport_icao the arrival airport
929
-	* @return String success or false
930 926
 	*
931 927
 	*/
932 928
 	public function addLiveMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $heading = '', $groundspeed = '', $date = '', $putinarchive = false, $mmsi = '',$type = '',$typeid = '',$imo = '', $callsign = '',$arrival_code = '',$arrival_date = '',$status = '',$statusid = '',$noarchive = false,$format_source = '', $source_name = '', $over_country = '',$captain_id = '',$captain_name = '',$race_id = '', $race_name = '', $distance = '', $race_rank = '', $race_time = '')
Please login to merge, or discard this patch.
require/class.Elevation.php 1 patch
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -53,6 +53,11 @@  discard block
 block discarded – undo
53 53
 		$this->openedFiles = [];
54 54
 	}
55 55
 
56
+	/**
57
+	 * @param string $fileName
58
+	 * @param double $row
59
+	 * @param double $column
60
+	 */
56 61
 	private function getElevationAtPosition($fileName, $row, $column) {
57 62
 		if (!array_key_exists($fileName, $this->openedFiles)) {
58 63
 			if (!file_exists($this->htgFilesDestination . DIRECTORY_SEPARATOR . $fileName)) {
@@ -153,6 +158,9 @@  discard block
 block discarded – undo
153 158
 		else return $zN;
154 159
 	}
155 160
 
161
+	/**
162
+	 * @param integer $numPrefix
163
+	 */
156 164
 	private function getDeg($deg, $numPrefix) {
157 165
 		$deg = abs($deg);
158 166
 		$d   = floor($deg);     // round degrees
@@ -167,6 +175,9 @@  discard block
 block discarded – undo
167 175
 		return $d;
168 176
 	}
169 177
 
178
+	/**
179
+	 * @param double $deg
180
+	 */
170 181
 	private function getSec($deg) {
171 182
 		$deg = abs($deg);
172 183
 		$sec = round($deg * 3600, 4);
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 = 55;
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.Source.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -179,6 +179,9 @@
 block discarded – undo
179 179
 		}
180 180
 	}
181 181
 
182
+	/**
183
+	 * @param string $type
184
+	 */
182 185
 	public function deleteLocationByType($type) {
183 186
 		$query = "DELETE FROM source_location WHERE type = :type";
184 187
 		$query_values = array(':type' => $type);
Please login to merge, or discard this patch.
install/class.update_db.php 1 patch
Doc Comments   +48 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@  discard block
 block discarded – undo
20 20
 		return $writable;
21 21
 	}
22 22
 
23
+	/**
24
+	 * @param string $file
25
+	 */
23 26
 	public static function download($url, $file, $referer = '') {
24 27
 		global $globalProxy, $globalForceIPv4;
25 28
 		$fp = fopen($file, 'w');
@@ -44,6 +47,9 @@  discard block
 block discarded – undo
44 47
 		fclose($fp);
45 48
 	}
46 49
 
50
+	/**
51
+	 * @param string $in_file
52
+	 */
47 53
 	public static function gunzip($in_file,$out_file_name = '') {
48 54
 		//echo $in_file.' -> '.$out_file_name."\n";
49 55
 		$buffer_size = 4096; // read 4kb at a time
@@ -65,6 +71,9 @@  discard block
 block discarded – undo
65 71
 		}
66 72
 	}
67 73
 
74
+	/**
75
+	 * @param string $in_file
76
+	 */
68 77
 	public static function unzip($in_file) {
69 78
 		if ($in_file != '' && file_exists($in_file)) {
70 79
 			$path = pathinfo(realpath($in_file), PATHINFO_DIRNAME);
@@ -86,6 +95,9 @@  discard block
 block discarded – undo
86 95
 		}
87 96
 	}
88 97
 	
98
+	/**
99
+	 * @param string $database_file
100
+	 */
89 101
 	public static function retrieve_route_sqlite_to_dest($database_file) {
90 102
 		global $globalDebug, $globalTransaction;
91 103
 		//$query = 'TRUNCATE TABLE routes';
@@ -128,6 +140,10 @@  discard block
 block discarded – undo
128 140
 		}
129 141
                 return '';
130 142
 	}
143
+
144
+	/**
145
+	 * @param string $database_file
146
+	 */
131 147
 	public static function retrieve_route_oneworld($database_file) {
132 148
 		global $globalDebug, $globalTransaction;
133 149
 		//$query = 'TRUNCATE TABLE routes';
@@ -169,6 +185,9 @@  discard block
 block discarded – undo
169 185
                 return '';
170 186
 	}
171 187
 	
188
+	/**
189
+	 * @param string $database_file
190
+	 */
172 191
 	public static function retrieve_route_skyteam($database_file) {
173 192
 		global $globalDebug, $globalTransaction;
174 193
 		//$query = 'TRUNCATE TABLE routes';
@@ -211,6 +230,10 @@  discard block
 block discarded – undo
211 230
 		}
212 231
                 return '';
213 232
 	}
233
+
234
+	/**
235
+	 * @param string $database_file
236
+	 */
214 237
 	public static function retrieve_modes_sqlite_to_dest($database_file) {
215 238
 		global $globalTransaction;
216 239
 		//$query = 'TRUNCATE TABLE aircraft_modes';
@@ -277,6 +300,9 @@  discard block
 block discarded – undo
277 300
 		return '';
278 301
 	}
279 302
 
303
+	/**
304
+	 * @param string $database_file
305
+	 */
280 306
 	public static function retrieve_modes_flarmnet($database_file) {
281 307
 		global $globalTransaction;
282 308
 		$Common = new Common();
@@ -347,6 +373,9 @@  discard block
 block discarded – undo
347 373
 		return '';
348 374
 	}
349 375
 
376
+	/**
377
+	 * @param string $database_file
378
+	 */
350 379
 	public static function retrieve_modes_ogn($database_file) {
351 380
 		global $globalTransaction;
352 381
 		//$query = 'TRUNCATE TABLE aircraft_modes';
@@ -416,6 +445,9 @@  discard block
 block discarded – undo
416 445
 		return '';
417 446
 	}
418 447
 
448
+	/**
449
+	 * @param string $database_file
450
+	 */
419 451
 	public static function retrieve_owner($database_file,$country = 'F') {
420 452
 		global $globalTransaction, $globalMasterSource;
421 453
 		//$query = 'TRUNCATE TABLE aircraft_modes';
@@ -1448,6 +1480,10 @@  discard block
 block discarded – undo
1448 1480
 		return '';
1449 1481
         }
1450 1482
 
1483
+	/**
1484
+	 * @param string $filename
1485
+	 * @param string $tletype
1486
+	 */
1451 1487
 	public static function tle($filename,$tletype) {
1452 1488
 		require_once(dirname(__FILE__).'/../require/class.Spotter.php');
1453 1489
 		global $tmp_dir, $globalTransaction;
@@ -1497,6 +1533,9 @@  discard block
 block discarded – undo
1497 1533
 		return '';
1498 1534
         }
1499 1535
 
1536
+	/**
1537
+	 * @param string $filename
1538
+	 */
1500 1539
 	public static function satellite_ucsdb($filename) {
1501 1540
 		global $tmp_dir, $globalTransaction;
1502 1541
 		
@@ -1545,6 +1584,9 @@  discard block
 block discarded – undo
1545 1584
 		return '';
1546 1585
 	}
1547 1586
 
1587
+	/**
1588
+	 * @param string $filename
1589
+	 */
1548 1590
 	public static function satellite_celestrak($filename) {
1549 1591
 		global $tmp_dir, $globalTransaction, $globalDebug;
1550 1592
 		$satcat_sources = array(
@@ -1871,6 +1913,9 @@  discard block
 block discarded – undo
1871 1913
 
1872 1914
 	}
1873 1915
 */
1916
+	/**
1917
+	 * @param string $filename
1918
+	 */
1874 1919
 	public static function waypoints($filename) {
1875 1920
 		//require_once(dirname(__FILE__).'/../require/class.Spotter.php');
1876 1921
 		global $tmp_dir, $globalTransaction;
@@ -1948,6 +1993,9 @@  discard block
 block discarded – undo
1948 1993
 		}
1949 1994
 	}
1950 1995
 
1996
+	/**
1997
+	 * @param string $filename
1998
+	 */
1951 1999
 	public static function ivao_airlines($filename) {
1952 2000
 		//require_once(dirname(__FILE__).'/../require/class.Spotter.php');
1953 2001
 		global $tmp_dir, $globalTransaction;
Please login to merge, or discard this patch.
require/class.Common.php 1 patch
Doc Comments   +15 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,6 +133,9 @@  discard block
 block discarded – undo
133 133
 		fclose($fp);
134 134
 	}
135 135
 
136
+	/**
137
+	 * @param string $in_file
138
+	 */
136 139
 	public static function gunzip($in_file,$out_file_name = '') {
137 140
 		//echo $in_file.' -> '.$out_file_name."\n";
138 141
 		$buffer_size = 4096; // read 4kb at a time
@@ -294,7 +297,7 @@  discard block
 block discarded – undo
294 297
 	* Check is distance realistic
295 298
 	* @param int $timeDifference the time between the reception of both messages
296 299
 	* @param float $distance distance covered
297
-	* @return whether distance is realistic
300
+	* @return boolean distance is realistic
298 301
 	*/
299 302
 	public function withinThreshold ($timeDifference, $distance) {
300 303
 		$x = abs($timeDifference);
@@ -318,6 +321,9 @@  discard block
 block discarded – undo
318 321
 	}
319 322
 
320 323
 
324
+	/**
325
+	 * @param string $latlong
326
+	 */
321 327
 	public function convertDec($dms,$latlong) {
322 328
 		if ($latlong == 'latitude') {
323 329
 			$deg = substr($dms, 0, 2);
@@ -352,6 +358,9 @@  discard block
 block discarded – undo
352 358
 		return array('latitude' => round($latitude,5),'longitude' => round($longitude,5));
353 359
 	}
354 360
 	
361
+	/**
362
+	 * @param string $latlong
363
+	 */
355 364
 	public function convertDM($coord,$latlong) {
356 365
 		if ($latlong == 'latitude') {
357 366
 			if ($coord < 0) $NSEW = 'S';
@@ -504,7 +513,7 @@  discard block
 block discarded – undo
504 513
 	/**
505 514
 	* Returns list of available locales
506 515
 	*
507
-	* @return array
516
+	* @return string[]
508 517
 	 */
509 518
 	public function listLocaleDir()
510 519
 	{
@@ -765,6 +774,10 @@  discard block
 block discarded – undo
765 774
 	}
766 775
 
767 776
 	// Come from comment : http://php.net/manual/fr/function.is-writable.php#73596
777
+
778
+	/**
779
+	 * @param string $path
780
+	 */
768 781
 	public function is__writable($path) {
769 782
 		//will work in despite of Windows ACLs bug
770 783
 		//NOTE: use a trailing slash for folders!!!
Please login to merge, or discard this patch.