@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @param string $title |
| 35 | 35 | * @param string $dest |
| 36 | 36 | * @param int $time |
| 37 | - * @param bool|true $show_header |
|
| 37 | + * @param boolean $show_header |
|
| 38 | 38 | */ |
| 39 | 39 | function message($mes, $title = 'Error', $dest = '', $time = 5, $show_header = true) { |
| 40 | 40 | $template = gettemplate('message_body', true); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * @param bool|true $isDisplayTopNav |
| 196 | 196 | * @param string $metatags |
| 197 | 197 | * @param bool|false $AdminPage |
| 198 | - * @param bool|true $isDisplayMenu |
|
| 198 | + * @param boolean $isDisplayMenu |
|
| 199 | 199 | * |
| 200 | 200 | * @return mixed |
| 201 | 201 | */ |
@@ -208,7 +208,6 @@ discard block |
||
| 208 | 208 | * @param string $title |
| 209 | 209 | * @param bool|true $isDisplayTopNav |
| 210 | 210 | * @param string $metatags |
| 211 | - * @param bool|false $AdminPage |
|
| 212 | 211 | * @param bool|true $isDisplayMenu |
| 213 | 212 | * @param bool|int|string $exitStatus - Код или сообщение выхода |
| 214 | 213 | */ |
@@ -385,10 +384,10 @@ discard block |
||
| 385 | 384 | |
| 386 | 385 | /** |
| 387 | 386 | * @param $time |
| 388 | - * @param $event |
|
| 387 | + * @param integer $event |
|
| 389 | 388 | * @param $msg |
| 390 | 389 | * @param $coordinates |
| 391 | - * @param $is_decrease |
|
| 390 | + * @param boolean $is_decrease |
|
| 392 | 391 | * @param Fleet $objFleet |
| 393 | 392 | * @param $fleet_flying_sorter |
| 394 | 393 | * @param $fleet_flying_events |
@@ -708,7 +707,7 @@ discard block |
||
| 708 | 707 | } |
| 709 | 708 | |
| 710 | 709 | /** |
| 711 | - * @param array|string $files |
|
| 710 | + * @param string $files |
|
| 712 | 711 | * @param template|bool $template |
| 713 | 712 | * @param string|bool $template_path |
| 714 | 713 | * |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | - * @param $ube_report_id |
|
| 153 | + * @param integer $ube_report_id |
|
| 154 | 154 | * |
| 155 | 155 | * @return array |
| 156 | 156 | * |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | |
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | - * @param $ube_report_id |
|
| 291 | + * @param integer $ube_report_id |
|
| 292 | 292 | * |
| 293 | 293 | * @return array |
| 294 | 294 | */ |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | // Рендерит таблицу общего результата боя |
| 337 | 337 | /** |
| 338 | 338 | * @param $array |
| 339 | - * @param $lang_header_index |
|
| 339 | + * @param string $lang_header_index |
|
| 340 | 340 | * |
| 341 | 341 | * @return array |
| 342 | 342 | */ |
@@ -362,6 +362,9 @@ discard block |
||
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | |
| 365 | + /** |
|
| 366 | + * @param integer $ube_report_id |
|
| 367 | + */ |
|
| 365 | 368 | public function sql_generate_outcome_unit_array(&$sql_perform_report_unit, $ube_report_id) { |
| 366 | 369 | $fleet_id = $this->db_id; |
| 367 | 370 | |
@@ -468,6 +471,10 @@ discard block |
||
| 468 | 471 | $this->fleet_capacity -= $fleet_total_resources; |
| 469 | 472 | } |
| 470 | 473 | |
| 474 | + /** |
|
| 475 | + * @param integer $is_small_fleet_recce |
|
| 476 | + * @param integer $reapers_status |
|
| 477 | + */ |
|
| 471 | 478 | public function db_save_combat_result_fleet($is_small_fleet_recce, $reapers_status) { |
| 472 | 479 | $ship_count_initial = $this->unit_list->unitsCount(); |
| 473 | 480 | $ship_count_lost = $this->unit_list->unitCountLost(); |
@@ -535,7 +542,7 @@ discard block |
||
| 535 | 542 | |
| 536 | 543 | /** |
| 537 | 544 | * @param UBEFleetList $fleet_list |
| 538 | - * @param $is_simulator |
|
| 545 | + * @param boolean $is_simulator |
|
| 539 | 546 | * |
| 540 | 547 | * @version 2016-02-25 23:42:45 41a4.68 |
| 541 | 548 | */ |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * |
| 11 | 11 | * @param Fleet $objFleet |
| 12 | 12 | * @param bool $start |
| 13 | - * @param null $result |
|
| 13 | + * @param integer $result |
|
| 14 | 14 | * |
| 15 | 15 | * @return mixed |
| 16 | 16 | */ |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * Fleet mission "Relocate" |
| 33 | 33 | * |
| 34 | - * @param $mission_data Mission |
|
| 34 | + * @param Mission $mission_data Mission |
|
| 35 | 35 | * |
| 36 | 36 | * @return int |
| 37 | 37 | * |
@@ -286,7 +286,6 @@ discard block |
||
| 286 | 286 | /** |
| 287 | 287 | * Функция пытается залогиниться по всем известным провайдерам |
| 288 | 288 | * |
| 289 | - * @param null $result |
|
| 290 | 289 | */ |
| 291 | 290 | public function login() { |
| 292 | 291 | if(empty(sn_module::$sn_module_list['auth'])) { |
@@ -823,10 +822,17 @@ discard block |
||
| 823 | 822 | |
| 824 | 823 | // OK v4.5 |
| 825 | 824 | // TODO - REMEMBER_ME |
| 825 | + |
|
| 826 | + /** |
|
| 827 | + * @param integer $period |
|
| 828 | + */ |
|
| 826 | 829 | protected static function cookie_set($value, $impersonate = false, $period = null) { |
| 827 | 830 | sn_setcookie($impersonate ? SN_COOKIE_U_I : SN_COOKIE_U, $value, $period === null ? SN_TIME_NOW + PERIOD_YEAR : $period, SN_ROOT_RELATIVE); |
| 828 | 831 | } |
| 829 | 832 | |
| 833 | + /** |
|
| 834 | + * @param string $message |
|
| 835 | + */ |
|
| 830 | 836 | protected static function flog($message, $die = false) { |
| 831 | 837 | if(!defined('DEBUG_AUTH') || !DEBUG_AUTH) { |
| 832 | 838 | return; |
@@ -171,6 +171,10 @@ discard block |
||
| 171 | 171 | * @return bool |
| 172 | 172 | */ |
| 173 | 173 | // OK v4.5 |
| 174 | + |
|
| 175 | + /** |
|
| 176 | + * @param string $account_name_unsafe |
|
| 177 | + */ |
|
| 174 | 178 | public function db_get_by_name($account_name_unsafe) { |
| 175 | 179 | $this->reset(); |
| 176 | 180 | |
@@ -207,6 +211,11 @@ discard block |
||
| 207 | 211 | * |
| 208 | 212 | */ |
| 209 | 213 | // OK v4.5 |
| 214 | + |
|
| 215 | + /** |
|
| 216 | + * @param string $account_name_unsafe |
|
| 217 | + * @param string $email_unsafe |
|
| 218 | + */ |
|
| 210 | 219 | public function db_get_by_name_or_email($account_name_unsafe, $email_unsafe) { |
| 211 | 220 | $this->reset(); |
| 212 | 221 | |
@@ -223,6 +232,13 @@ discard block |
||
| 223 | 232 | * @throws Exception |
| 224 | 233 | */ |
| 225 | 234 | // OK v4.5 |
| 235 | + |
|
| 236 | + /** |
|
| 237 | + * @param string $account_name_unsafe |
|
| 238 | + * @param string $password_raw |
|
| 239 | + * @param string $email_unsafe |
|
| 240 | + * @param string $language_unsafe |
|
| 241 | + */ |
|
| 226 | 242 | public function db_create($account_name_unsafe, $password_raw, $email_unsafe, $language_unsafe = null, $salt_unsafe = null) { |
| 227 | 243 | $this->reset(); |
| 228 | 244 | |
@@ -317,6 +333,11 @@ discard block |
||
| 317 | 333 | * @return int|string |
| 318 | 334 | */ |
| 319 | 335 | // OK 4.8 |
| 336 | + |
|
| 337 | + /** |
|
| 338 | + * @param integer $change_type |
|
| 339 | + * @param double $metamatter |
|
| 340 | + */ |
|
| 320 | 341 | protected function db_mm_log_insert($comment, $change_type, $metamatter, $user_id_unsafe) { |
| 321 | 342 | $provider_id_safe = intval(core_auth::$main_provider->provider_id); |
| 322 | 343 | //$account_id_safe = $this->db->db_escape($this->account_id); |
@@ -188,6 +188,11 @@ discard block |
||
| 188 | 188 | */ |
| 189 | 189 | // OK v4 |
| 190 | 190 | // TODO - вынести в отдельный класс |
| 191 | +/** |
|
| 192 | + * @param string $db_id_field_name |
|
| 193 | + * @param string $db_table_name |
|
| 194 | + * @param string $db_value_field_name |
|
| 195 | + */ |
|
| 191 | 196 | function db_get_set_unique_id_value($current_value_unsafe, $db_id_field_name, $db_table_name, $db_value_field_name) { |
| 192 | 197 | $current_value_safe = db_escape($current_value_unsafe); |
| 193 | 198 | $value_id = doquery("SELECT `{$db_id_field_name}` AS id_field FROM {{{$db_table_name}}} WHERE `{$db_value_field_name}` = '{$current_value_safe}' LIMIT 1 FOR UPDATE", true); |
@@ -220,7 +225,7 @@ discard block |
||
| 220 | 225 | |
| 221 | 226 | /** |
| 222 | 227 | * @param $user |
| 223 | - * @param $username_safe |
|
| 228 | + * @param string $username_safe |
|
| 224 | 229 | */ |
| 225 | 230 | function db_player_name_history_replace($user, $username_safe) { |
| 226 | 231 | doquery("REPLACE INTO {{player_name_history}} SET `player_id` = {$user['id']}, `player_name` = '{$username_safe}'"); |
@@ -228,7 +233,7 @@ discard block |
||
| 228 | 233 | |
| 229 | 234 | |
| 230 | 235 | /** |
| 231 | - * @param $username_safe |
|
| 236 | + * @param string $username_safe |
|
| 232 | 237 | * |
| 233 | 238 | * @return array|bool|mysqli_result|null |
| 234 | 239 | */ |
@@ -485,12 +490,12 @@ discard block |
||
| 485 | 490 | |
| 486 | 491 | |
| 487 | 492 | /** |
| 488 | - * @param $user_id |
|
| 489 | - * @param $change_type |
|
| 493 | + * @param integer $user_id |
|
| 494 | + * @param integer $change_type |
|
| 490 | 495 | * @param $dark_matter |
| 491 | - * @param $comment |
|
| 496 | + * @param string $comment |
|
| 492 | 497 | * @param $row |
| 493 | - * @param $page_url |
|
| 498 | + * @param string $page_url |
|
| 494 | 499 | */ |
| 495 | 500 | function db_log_dark_matter_insert($user_id, $change_type, $dark_matter, $comment, $row, $page_url) { |
| 496 | 501 | doquery( |
@@ -506,7 +511,7 @@ discard block |
||
| 506 | 511 | /** |
| 507 | 512 | * @param $user_id_safe |
| 508 | 513 | * |
| 509 | - * @return array|bool|mysqli_result|null |
|
| 514 | + * @return integer |
|
| 510 | 515 | */ |
| 511 | 516 | function db_referral_get_by_id($user_id_safe) { |
| 512 | 517 | $old_referral = doquery("SELECT * FROM {{referrals}} WHERE `id` = {$user_id_safe} LIMIT 1 FOR UPDATE;", true); |
@@ -534,9 +539,9 @@ discard block |
||
| 534 | 539 | |
| 535 | 540 | // Quests *********************************************************************************************************** |
| 536 | 541 | /** |
| 537 | - * @param $query_add_select |
|
| 542 | + * @param string $query_add_select |
|
| 538 | 543 | * @param $query_add_from |
| 539 | - * @param $query_add_where |
|
| 544 | + * @param string $query_add_where |
|
| 540 | 545 | * |
| 541 | 546 | * @return array|bool|mysqli_result|null |
| 542 | 547 | */ |
@@ -580,11 +585,11 @@ discard block |
||
| 580 | 585 | } |
| 581 | 586 | |
| 582 | 587 | /** |
| 583 | - * @param $quest_name |
|
| 584 | - * @param $quest_type |
|
| 585 | - * @param $quest_description |
|
| 588 | + * @param string $quest_name |
|
| 589 | + * @param integer $quest_type |
|
| 590 | + * @param string $quest_description |
|
| 586 | 591 | * @param $quest_conditions |
| 587 | - * @param $quest_rewards |
|
| 592 | + * @param string $quest_rewards |
|
| 588 | 593 | * @param $quest_id |
| 589 | 594 | */ |
| 590 | 595 | function db_quest_update($quest_name, $quest_type, $quest_description, $quest_conditions, $quest_rewards, $quest_id) { |
@@ -607,7 +612,7 @@ discard block |
||
| 607 | 612 | /** |
| 608 | 613 | * @param $banner |
| 609 | 614 | * @param $banned |
| 610 | - * @param $reason |
|
| 615 | + * @param string $reason |
|
| 611 | 616 | * @param $ban_until |
| 612 | 617 | */ |
| 613 | 618 | function db_ban_insert($banner, $banned, $reason, $ban_until) { |
@@ -630,7 +635,7 @@ discard block |
||
| 630 | 635 | /** |
| 631 | 636 | * @param $banner |
| 632 | 637 | * @param $banned |
| 633 | - * @param $reason |
|
| 638 | + * @param string $reason |
|
| 634 | 639 | */ |
| 635 | 640 | function db_ban_insert_unset($banner, $banned, $reason) { |
| 636 | 641 | doquery( |
@@ -972,7 +972,7 @@ discard block |
||
| 972 | 972 | /** |
| 973 | 973 | * Set current resource list from array of units |
| 974 | 974 | * |
| 975 | - * @param array $resource_list |
|
| 975 | + * @param integer[] $resource_list |
|
| 976 | 976 | */ |
| 977 | 977 | public function resourcesSet($resource_list) { |
| 978 | 978 | if (!empty($this->propertiesAdjusted['resource_list'])) { |
@@ -1020,7 +1020,7 @@ discard block |
||
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | 1022 | /** |
| 1023 | - * @param array $rate |
|
| 1023 | + * @param integer[] $rate |
|
| 1024 | 1024 | * |
| 1025 | 1025 | * @return float |
| 1026 | 1026 | */ |
@@ -1051,7 +1051,6 @@ discard block |
||
| 1051 | 1051 | * Restores fleet or resources to planet |
| 1052 | 1052 | * |
| 1053 | 1053 | * @param bool $start |
| 1054 | - * @param bool $only_resources |
|
| 1055 | 1054 | * @param int $result |
| 1056 | 1055 | * |
| 1057 | 1056 | * @return int |
@@ -1205,6 +1204,9 @@ discard block |
||
| 1205 | 1204 | } |
| 1206 | 1205 | |
| 1207 | 1206 | |
| 1207 | + /** |
|
| 1208 | + * @param integer $missionStartTimeStamp |
|
| 1209 | + */ |
|
| 1208 | 1210 | protected function renderFleetCoordinates($missionStartTimeStamp = SN_TIME_NOW, $timeMissionJob = 0) { |
| 1209 | 1211 | $timeToReturn = $this->travelData['duration'] * 2 + $timeMissionJob; |
| 1210 | 1212 | |
@@ -21,11 +21,19 @@ discard block |
||
| 21 | 21 | return empty($result) ? null : $result; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param integer $galaxy |
|
| 26 | + * @param integer $system |
|
| 27 | + * @param integer $planet |
|
| 28 | + */ |
|
| 24 | 29 | public static function db_planet_by_gspt_safe($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
| 25 | 30 | return classSupernova::db_get_record_list(LOC_PLANET, |
| 26 | 31 | "{{planets}}.`galaxy` = {$galaxy} AND {{planets}}.`system` = {$system} AND {{planets}}.`planet` = {$planet} AND {{planets}}.`planet_type` = {$planet_type}", true); |
| 27 | 32 | } |
| 28 | 33 | |
| 34 | + /** |
|
| 35 | + * @param integer $planet_type |
|
| 36 | + */ |
|
| 29 | 37 | public static function db_planet_by_gspt($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
| 30 | 38 | $galaxy = intval($galaxy); |
| 31 | 39 | $system = intval($system); |
@@ -120,6 +128,9 @@ discard block |
||
| 120 | 128 | "`id_owner` = '{$user_row['id']}' {$conditions} ORDER BY {$order_by}"); |
| 121 | 129 | } |
| 122 | 130 | |
| 131 | + /** |
|
| 132 | + * @param integer $planet_id |
|
| 133 | + */ |
|
| 123 | 134 | public static function db_planet_list_by_user_or_planet($user_id, $planet_id) { |
| 124 | 135 | if(!($user_id = idval($user_id)) && !($planet_id = idval($planet_id))) { |
| 125 | 136 | return false; |
@@ -138,6 +149,9 @@ discard block |
||
| 138 | 149 | return classSupernova::db_upd_record_by_id(LOC_PLANET, $planet_id, $set); |
| 139 | 150 | } |
| 140 | 151 | |
| 152 | + /** |
|
| 153 | + * @param integer $ui_planet_type |
|
| 154 | + */ |
|
| 141 | 155 | public static function db_planet_set_by_gspt($ui_galaxy, $ui_system, $ui_planet, $ui_planet_type = PT_ALL, $set) { |
| 142 | 156 | if(!($set = trim($set))) { |
| 143 | 157 | return false; |