Completed
Push — master ( 47c470...f34650 )
by Yannick
35:55
created
require/class.SBS.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -190,12 +190,20 @@
 block discarded – undo
190 190
 		return 1;
191 191
 	}
192 192
 
193
+	/**
194
+	 * @param double $lat
195
+	 * @param integer $isodd
196
+	 */
193 197
 	private function cprN($lat,$isodd) {
194 198
 		$nl = $this->cprNL($lat) - $isodd;
195 199
 		if ($nl > 1) return $nl;
196 200
 		else return 1;
197 201
 	}
198 202
 
203
+	/**
204
+	 * @param string $msg
205
+	 * @param string $bin
206
+	 */
199 207
 	private function parityCheck($msg, $bin) {
200 208
 		$modes_checksum_table = array(
201 209
 		    0x3935ea, 0x1c9af5, 0xf1b77e, 0x78dbbf, 0xc397db, 0x9e31e9, 0xb0e2f0, 0x587178,
Please login to merge, or discard this patch.
require/class.AIS.php 1 patch
Doc Comments   +25 added lines patch added patch discarded remove patch
@@ -156,6 +156,10 @@  discard block
 block discarded – undo
156 156
        't', 'u', 'v', 'w' // 119
157 157
     ); // char 64
158 158
     */
159
+
160
+	/**
161
+	 * @param integer $ascii
162
+	 */
159 163
 	private function asciidec_2_8bit($ascii) {
160 164
 		//only process in the following range: 48-87, 96-119
161 165
 		if ($ascii < 48) { }
@@ -181,6 +185,10 @@  discard block
 block discarded – undo
181 185
 		return(substr($bin, -6)); 
182 186
 	}
183 187
 
188
+	/**
189
+	 * @param integer $_start
190
+	 * @param integer $_size
191
+	 */
184 192
 	private function binchar($_str, $_start, $_size) {
185 193
 		//  ' ' --- '?', // 0x20 - 0x3F
186 194
 		//  '@' --- '_', // 0x40 - 0x5F
@@ -206,6 +214,10 @@  discard block
 block discarded – undo
206 214
 	}
207 215
 
208 216
 	// function for decoding the AIS Message ITU Payload
217
+
218
+	/**
219
+	 * @param string $_aisdata
220
+	 */
209 221
 	private function decode_ais($_aisdata) {
210 222
 		$ro = new stdClass(); // return object
211 223
 		$ro->cls = 0; // AIS class undefined, also indicate unparsed msg
@@ -378,6 +390,12 @@  discard block
 block discarded – undo
378 390
 		else return 0;
379 391
 	}
380 392
 
393
+	/**
394
+	 * @param string $_itu
395
+	 * @param integer $_len
396
+	 * @param integer $_filler
397
+	 * @param string $aux
398
+	 */
381 399
 	public function process_ais_itu($_itu, $_len, $_filler, $aux /*, $ais_ch*/) {
382 400
 		global $port; // tcpip port...
383 401
 		static $debug_counter = 0;
@@ -397,6 +415,10 @@  discard block
 block discarded – undo
397 415
 
398 416
 	// char* - AIS \r terminated string
399 417
 	// TCP based streams which send messages in full can use this instead of calling process_ais_buf
418
+
419
+	/**
420
+	 * @param string $rawdata
421
+	 */
400 422
 	public function process_ais_raw($rawdata, $aux = '') { // return int
401 423
 		static $num_seq; // 1 to 9
402 424
 		static $seq; // 1 to 9
@@ -622,6 +644,9 @@  discard block
 block discarded – undo
622 644
 		return $result;
623 645
 	}
624 646
 
647
+	/**
648
+	 * @param string $mmsi
649
+	 */
625 650
 	public function mmsitype($mmsi) {
626 651
 		if (strlen($mmsi) == 9) {
627 652
 			if (substr($mmsi,0,3) == '974') return 'EPIRB (Emergency Position Indicating Radio Beacon) AIS';
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
@@ -1126,6 +1126,10 @@  discard block
 block discarded – undo
1126 1126
 		else return array();
1127 1127
 	}
1128 1128
 
1129
+	/**
1130
+	 * @param string $type
1131
+	 * @param string $rules
1132
+	 */
1129 1133
 	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) {
1130 1134
 		$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)";
1131 1135
 		$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);
@@ -1207,6 +1211,10 @@  discard block
 block discarded – undo
1207 1211
 			}
1208 1212
 		}
1209 1213
 	}
1214
+
1215
+	/**
1216
+	 * @param string $filename
1217
+	 */
1210 1218
 	public function updateNOTAMfromTextFile($filename) {
1211 1219
 		global $globalTransaction, $globalDebug;
1212 1220
 		$alldata = $this->parseNOTAMtextFile($filename);
@@ -1261,6 +1269,9 @@  discard block
 block discarded – undo
1261 1269
 		}
1262 1270
 	}
1263 1271
 
1272
+	/**
1273
+	 * @param string $icao
1274
+	 */
1264 1275
 	public function downloadNOTAM($icao) {
1265 1276
 		date_default_timezone_set("UTC");
1266 1277
 		$Common = new Common();
@@ -1416,6 +1427,9 @@  discard block
 block discarded – undo
1416 1427
 		return $result;
1417 1428
 	}
1418 1429
 	
1430
+	/**
1431
+	 * @param string $code
1432
+	 */
1419 1433
 	public function parse_code($code) {
1420 1434
 		$code = str_split($code);
1421 1435
 		$code_fp = $code[1].$code[2];
Please login to merge, or discard this patch.
require/class.Language.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	/**
78 78
 	* Returns list of available locales
79 79
 	*
80
-	* @return array
80
+	* @return string[]
81 81
 	*/
82 82
 	public function listLocaleDir()
83 83
 	{
@@ -97,6 +97,9 @@  discard block
 block discarded – undo
97 97
 		return $result;
98 98
 	}
99 99
 
100
+	/**
101
+	 * @param string $locale
102
+	 */
100 103
 	public function getLocale($locale)
101 104
 	{
102 105
 		return array($locale,$this->all_languages[$locale][1],$this->all_languages[$locale][2],$locale.'.utf8',$locale.'.UTF8');
Please login to merge, or discard this patch.
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.