@@ -53,6 +53,11 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -20,6 +20,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -133,6 +133,9 @@ discard block |
||
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 |
@@ -318,6 +321,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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!!! |
@@ -286,6 +286,7 @@ discard block |
||
286 | 286 | * |
287 | 287 | * @param String $aircraft_registration the registration of the aircraft |
288 | 288 | * @param String $aircraft_name type of the aircraft |
289 | + * @param string $type |
|
289 | 290 | * @return array the aircraft thumbnail, orignal url and copyright |
290 | 291 | * |
291 | 292 | */ |
@@ -318,7 +319,7 @@ discard block |
||
318 | 319 | /** |
319 | 320 | * Gets the aircraft image from Deviantart |
320 | 321 | * |
321 | - * @param $type |
|
322 | + * @param string $type |
|
322 | 323 | * @param String $registration the registration of the aircraft |
323 | 324 | * @param String $name type of the aircraft |
324 | 325 | * @return array the aircraft thumbnail, orignal url and copyright |
@@ -360,6 +361,7 @@ discard block |
||
360 | 361 | * |
361 | 362 | * @param String $aircraft_registration the registration of the aircraft |
362 | 363 | * @param String $aircraft_name type of the aircraft |
364 | + * @param string $type |
|
363 | 365 | * @return array the aircraft thumbnail, orignal url and copyright |
364 | 366 | * |
365 | 367 | */ |
@@ -402,6 +404,7 @@ discard block |
||
402 | 404 | * |
403 | 405 | * @param String $aircraft_registration the registration of the aircraft |
404 | 406 | * @param String $aircraft_name type of the aircraft |
407 | + * @param string $type |
|
405 | 408 | * @return array the aircraft thumbnail, orignal url and copyright |
406 | 409 | * |
407 | 410 | */ |
@@ -436,6 +439,7 @@ discard block |
||
436 | 439 | * |
437 | 440 | * @param String $registration the registration of the aircraft |
438 | 441 | * @param String $name type of the aircraft |
442 | + * @param string $type |
|
439 | 443 | * @return array the aircraft thumbnail, orignal url and copyright |
440 | 444 | * |
441 | 445 | */ |
@@ -466,8 +470,8 @@ discard block |
||
466 | 470 | } |
467 | 471 | |
468 | 472 | /** |
469 | - * @param $type |
|
470 | - * @param $aircraft_icao |
|
473 | + * @param string $type |
|
474 | + * @param string $aircraft_icao |
|
471 | 475 | * @param $airline_icao |
472 | 476 | * @return array |
473 | 477 | */ |
@@ -490,7 +494,7 @@ discard block |
||
490 | 494 | /** |
491 | 495 | * Gets the aircraft image from Bing |
492 | 496 | * |
493 | - * @param $type |
|
497 | + * @param string $type |
|
494 | 498 | * @param String $aircraft_registration the registration of the aircraft |
495 | 499 | * @param String $aircraft_name type of the aircraft |
496 | 500 | * @return array the aircraft thumbnail, orignal url and copyright |
@@ -529,6 +533,7 @@ discard block |
||
529 | 533 | * |
530 | 534 | * @param String $aircraft_registration the registration of the aircraft |
531 | 535 | * @param String $aircraft_name type of the aircraft |
536 | + * @param string $type |
|
532 | 537 | * @return array the aircraft thumbnail, orignal url and copyright |
533 | 538 | * |
534 | 539 | */ |
@@ -554,6 +559,7 @@ discard block |
||
554 | 559 | * |
555 | 560 | * @param String $registration the registration of the aircraft/mmsi |
556 | 561 | * @param String $name name |
562 | + * @param string $type |
|
557 | 563 | * @return array the aircraft thumbnail, orignal url and copyright |
558 | 564 | * |
559 | 565 | */ |
@@ -615,6 +621,7 @@ discard block |
||
615 | 621 | * |
616 | 622 | * @param String $registration the registration of the aircraft |
617 | 623 | * @param String $name type of the aircraft |
624 | + * @param string $type |
|
618 | 625 | * @return array the aircraft thumbnail, orignal url and copyright |
619 | 626 | * |
620 | 627 | */ |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | /** |
1785 | 1785 | * Counts all hours |
1786 | 1786 | * |
1787 | - * @param $orderby |
|
1787 | + * @param string $orderby |
|
1788 | 1788 | * @param array $filters |
1789 | 1789 | * @return array the hour list |
1790 | 1790 | */ |
@@ -2263,7 +2263,7 @@ discard block |
||
2263 | 2263 | /** |
2264 | 2264 | * Parses the direction degrees to working |
2265 | 2265 | * |
2266 | - * @param Float $direction the direction in degrees |
|
2266 | + * @param integer $direction the direction in degrees |
|
2267 | 2267 | * @return array the direction information |
2268 | 2268 | * |
2269 | 2269 | */ |
@@ -14,6 +14,9 @@ discard block |
||
14 | 14 | public $dbs = array(); |
15 | 15 | public $latest_schema = 55; |
16 | 16 | |
17 | + /** |
|
18 | + * @param string $dbname |
|
19 | + */ |
|
17 | 20 | public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
18 | 21 | global $globalNoDB; |
19 | 22 | if (!isset($globalNoDB) || $globalNoDB === FALSE) { |
@@ -146,6 +149,9 @@ discard block |
||
146 | 149 | return true; |
147 | 150 | } |
148 | 151 | |
152 | + /** |
|
153 | + * @param string $table |
|
154 | + */ |
|
149 | 155 | public function tableExists($table) |
150 | 156 | { |
151 | 157 | global $globalDBdriver; |
@@ -196,6 +202,11 @@ discard block |
||
196 | 202 | /* |
197 | 203 | * Check if index exist |
198 | 204 | */ |
205 | + |
|
206 | + /** |
|
207 | + * @param string $table |
|
208 | + * @param string $index |
|
209 | + */ |
|
199 | 210 | public function indexExists($table,$index) |
200 | 211 | { |
201 | 212 | global $globalDBdriver; |
@@ -238,6 +249,10 @@ discard block |
||
238 | 249 | return $columns; |
239 | 250 | } |
240 | 251 | |
252 | + /** |
|
253 | + * @param string $table |
|
254 | + * @param string $column |
|
255 | + */ |
|
241 | 256 | public function getColumnType($table,$column) { |
242 | 257 | $select = $this->db->query('SELECT '.$column.' FROM '.$table); |
243 | 258 | $tomet = $select->getColumnMeta(0); |
@@ -248,6 +263,11 @@ discard block |
||
248 | 263 | * Check if a column name exist in a table |
249 | 264 | * @return Boolean column exist or not |
250 | 265 | */ |
266 | + |
|
267 | + /** |
|
268 | + * @param string $table |
|
269 | + * @param string $name |
|
270 | + */ |
|
251 | 271 | public function checkColumnName($table,$name) |
252 | 272 | { |
253 | 273 | global $globalDBdriver, $globalDBname; |
@@ -187,6 +187,9 @@ |
||
187 | 187 | return ''; |
188 | 188 | } |
189 | 189 | |
190 | + /** |
|
191 | + * @param string $type |
|
192 | + */ |
|
190 | 193 | public function deleteLocationByType($type) { |
191 | 194 | $query = "DELETE FROM source_location WHERE type = :type"; |
192 | 195 | $query_values = array(':type' => $type); |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | /** |
1785 | 1785 | * Counts all hours |
1786 | 1786 | * |
1787 | - * @param $orderby |
|
1787 | + * @param string $orderby |
|
1788 | 1788 | * @param array $filters |
1789 | 1789 | * @return array the hour list |
1790 | 1790 | */ |
@@ -2263,7 +2263,7 @@ discard block |
||
2263 | 2263 | /** |
2264 | 2264 | * Parses the direction degrees to working |
2265 | 2265 | * |
2266 | - * @param Float $direction the direction in degrees |
|
2266 | + * @param integer $direction the direction in degrees |
|
2267 | 2267 | * @return array the direction information |
2268 | 2268 | * |
2269 | 2269 | */ |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | |
75 | 75 | /** |
76 | 76 | * @param $ident |
77 | - * @param $correct_ident |
|
78 | - * @param $source |
|
77 | + * @param string $correct_ident |
|
78 | + * @param string $source |
|
79 | 79 | * @return string |
80 | 80 | */ |
81 | 81 | public function addOperator($ident, $correct_ident, $source) { |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @param $ident |
94 | - * @param $correct_ident |
|
95 | - * @param $source |
|
94 | + * @param string $correct_ident |
|
95 | + * @param string $source |
|
96 | 96 | * @return string |
97 | 97 | */ |
98 | 98 | public function updateOperator($ident, $correct_ident, $source) { |