@@ -1126,6 +1126,10 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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]; |
@@ -77,7 +77,7 @@ discard block |
||
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 |
||
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'); |
@@ -100,6 +100,10 @@ discard block |
||
100 | 100 | return strlen($headerLine); // Needed by curl |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @param string $url |
|
105 | + * @param string $file |
|
106 | + */ |
|
103 | 107 | public static function download($url, $file, $referer = '') { |
104 | 108 | global $globalDebug, $globalProxy, $globalForceIPv4; |
105 | 109 | $fp = fopen($file, 'w'); |
@@ -124,6 +128,9 @@ discard block |
||
124 | 128 | fclose($fp); |
125 | 129 | } |
126 | 130 | |
131 | + /** |
|
132 | + * @param string $in_file |
|
133 | + */ |
|
127 | 134 | public static function gunzip($in_file,$out_file_name = '') { |
128 | 135 | //echo $in_file.' -> '.$out_file_name."\n"; |
129 | 136 | $buffer_size = 4096; // read 4kb at a time |
@@ -285,7 +292,7 @@ discard block |
||
285 | 292 | * Check is distance realistic |
286 | 293 | * @param int $timeDifference the time between the reception of both messages |
287 | 294 | * @param float $distance distance covered |
288 | - * @return whether distance is realistic |
|
295 | + * @return boolean distance is realistic |
|
289 | 296 | */ |
290 | 297 | public function withinThreshold ($timeDifference, $distance) { |
291 | 298 | $x = abs($timeDifference); |
@@ -309,6 +316,9 @@ discard block |
||
309 | 316 | } |
310 | 317 | |
311 | 318 | |
319 | + /** |
|
320 | + * @param string $latlong |
|
321 | + */ |
|
312 | 322 | public function convertDec($dms,$latlong) { |
313 | 323 | if ($latlong == 'latitude') { |
314 | 324 | $deg = substr($dms, 0, 2); |
@@ -343,6 +353,9 @@ discard block |
||
343 | 353 | return array('latitude' => round($latitude,5),'longitude' => round($longitude,5)); |
344 | 354 | } |
345 | 355 | |
356 | + /** |
|
357 | + * @param string $latlong |
|
358 | + */ |
|
346 | 359 | public function convertDM($coord,$latlong) { |
347 | 360 | if ($latlong == 'latitude') { |
348 | 361 | if ($coord < 0) $NSEW = 'S'; |
@@ -480,7 +493,7 @@ discard block |
||
480 | 493 | /** |
481 | 494 | * Returns list of available locales |
482 | 495 | * |
483 | - * @return array |
|
496 | + * @return string[] |
|
484 | 497 | */ |
485 | 498 | public function listLocaleDir() |
486 | 499 | { |
@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | public $dbs = array(); |
7 | 7 | public $latest_schema = 52; |
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -14,7 +14,7 @@ discard block |
||
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) { |
@@ -694,25 +694,6 @@ discard block |
||
694 | 694 | * |
695 | 695 | * @param String $fammarine_id the ID |
696 | 696 | * @param String $ident the marine ident |
697 | - * @param String $departure_airport_icao the departure airport |
|
698 | - * @param String $arrival_airport_icao the arrival airport |
|
699 | - * @param String $latitude latitude of flight |
|
700 | - * @param String $longitude latitude of flight |
|
701 | - * @param String $waypoints waypoints of flight |
|
702 | - * @param String $heading heading of flight |
|
703 | - * @param String $groundspeed speed of flight |
|
704 | - * @param String $date date of flight |
|
705 | - * @param String $departure_airport_time departure time of flight |
|
706 | - * @param String $arrival_airport_time arrival time of flight |
|
707 | - * @param String $squawk squawk code of flight |
|
708 | - * @param String $route_stop route stop of flight |
|
709 | - * @param String $highlight highlight or not |
|
710 | - * @param String $ModeS ModesS code of flight |
|
711 | - * @param String $registration registration code of flight |
|
712 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
713 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
714 | - * @param String $verticalrate vertival rate of flight |
|
715 | - * @return String success or false |
|
716 | 697 | */ |
717 | 698 | 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 = '', $captain_id = '',$captain_name = '',$race_id = '', $race_name = '') |
718 | 699 | { |
@@ -1310,6 +1291,7 @@ discard block |
||
1310 | 1291 | /** |
1311 | 1292 | * Counts all hours |
1312 | 1293 | * |
1294 | + * @param string $orderby |
|
1313 | 1295 | * @return Array the hour list |
1314 | 1296 | * |
1315 | 1297 | */ |
@@ -1661,7 +1643,7 @@ discard block |
||
1661 | 1643 | /** |
1662 | 1644 | * Parses the direction degrees to working |
1663 | 1645 | * |
1664 | - * @param Float $direction the direction in degrees |
|
1646 | + * @param integer $direction the direction in degrees |
|
1665 | 1647 | * @return Array the direction information |
1666 | 1648 | * |
1667 | 1649 | */ |
@@ -15,7 +15,7 @@ discard block |
||
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; |
@@ -915,10 +915,6 @@ discard block |
||
915 | 915 | * |
916 | 916 | * @param String $fammarine_id the ID from flightaware |
917 | 917 | * @param String $ident the flight ident |
918 | - * @param String $aircraft_icao the aircraft type |
|
919 | - * @param String $departure_airport_icao the departure airport |
|
920 | - * @param String $arrival_airport_icao the arrival airport |
|
921 | - * @return String success or false |
|
922 | 918 | * |
923 | 919 | */ |
924 | 920 | 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 = '') |