@@ -55,7 +55,6 @@ |
||
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * @param array $array |
|
| 59 | 58 | * |
| 60 | 59 | * @return array |
| 61 | 60 | */ |
@@ -37,7 +37,6 @@ |
||
| 37 | 37 | * TableSchema constructor. |
| 38 | 38 | * |
| 39 | 39 | * @param string $tableName |
| 40 | - * @param \db_mysql|null $db |
|
| 41 | 40 | */ |
| 42 | 41 | public function __construct($tableName, Schema $dbSchema) { |
| 43 | 42 | $this->dbSchema = $dbSchema; |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Convert $delimiter delimited string to array |
| 43 | 43 | * |
| 44 | - * @param mixed $string |
|
| 45 | - * @param string $delimiter |
|
| 44 | + * @param string $string |
|
| 45 | + * @param string string |
|
| 46 | 46 | * |
| 47 | 47 | * @return array |
| 48 | 48 | */ |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * @return array[] |
|
| 97 | + * @return \array[] |
|
| 98 | 98 | */ |
| 99 | 99 | protected static function dbGetTableFields() { |
| 100 | 100 | return static::db()->schema()->getTableSchema(static::tableName())->fields; |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | * DOES NOT override existing values |
| 621 | 621 | * DOES set default values for empty fields |
| 622 | 622 | * |
| 623 | - * @param array $fields List of field values [$fieldName => $fieldValue] |
|
| 623 | + * @param string[] $fields List of field values [$fieldName => $fieldValue] |
|
| 624 | 624 | */ |
| 625 | 625 | protected function fromFields(array $fields) { |
| 626 | 626 | $this->fromProperties(static::translateNames($fields, self::FIELDS_TO_PROPERTIES)); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @param string $title |
| 27 | 27 | * @param string $redirectTo |
| 28 | 28 | * @param int $timeout |
| 29 | - * @param bool|true $showHeader |
|
| 29 | + * @param boolean $showHeader |
|
| 30 | 30 | */ |
| 31 | 31 | function messageBox($message, $title = '', $redirectTo = '', $timeout = 5, $showHeader = true) { |
| 32 | 32 | global $lang, $template_result; |
@@ -60,6 +60,9 @@ discard block |
||
| 60 | 60 | messageBox($message, $title, $redirectTo, $timeout, false); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | +/** |
|
| 64 | + * @param integer $level |
|
| 65 | + */ |
|
| 63 | 66 | function messageBoxAdminAccessDenied($level = AUTH_LEVEL_ADMINISTRATOR) { |
| 64 | 67 | global $user, $lang; |
| 65 | 68 | |
@@ -215,10 +218,6 @@ discard block |
||
| 215 | 218 | /** |
| 216 | 219 | * @param template|string $page |
| 217 | 220 | * @param string $title |
| 218 | - * @param bool|true $isDisplayTopNav |
|
| 219 | - * @param string $metatags |
|
| 220 | - * @param bool|false $AdminPage |
|
| 221 | - * @param bool|true $isDisplayMenu |
|
| 222 | 221 | * |
| 223 | 222 | * @return mixed |
| 224 | 223 | */ |
@@ -233,11 +232,6 @@ discard block |
||
| 233 | 232 | /** |
| 234 | 233 | * @param template|string $page |
| 235 | 234 | * @param string $title |
| 236 | - * @param bool|true $isDisplayTopNav |
|
| 237 | - * @param string $metatags |
|
| 238 | - * @param bool|false $AdminPage |
|
| 239 | - * @param bool|true $isDisplayMenu |
|
| 240 | - * @param bool|int|string $exitStatus - Код или сообщение выхода |
|
| 241 | 235 | */ |
| 242 | 236 | function sn_display($page, $title = '') { |
| 243 | 237 | global $debug, $user, $planetrow, $config, $lang, $template_result, $sn_mvc, $sn_page_name; |
@@ -299,7 +293,7 @@ discard block |
||
| 299 | 293 | * @param $page |
| 300 | 294 | * @param $title |
| 301 | 295 | * @param $template_result |
| 302 | - * @param $inLoginLogout |
|
| 296 | + * @param boolean $inLoginLogout |
|
| 303 | 297 | * @param $user |
| 304 | 298 | * @param $config |
| 305 | 299 | * @param $lang |
@@ -423,7 +417,7 @@ discard block |
||
| 423 | 417 | } |
| 424 | 418 | |
| 425 | 419 | /** |
| 426 | - * @return mixed|string |
|
| 420 | + * @return string |
|
| 427 | 421 | */ |
| 428 | 422 | function playerFontSize() { |
| 429 | 423 | $font_size = !empty($_COOKIE[SN_COOKIE_F]) ? $_COOKIE[SN_COOKIE_F] : classSupernova::$user_options[PLAYER_OPTION_BASE_FONT_SIZE]; |
@@ -458,7 +452,7 @@ discard block |
||
| 458 | 452 | /** |
| 459 | 453 | * Checks if minified/full-size CSS file exists - and adds it if any |
| 460 | 454 | * |
| 461 | - * @param $cssFileName |
|
| 455 | + * @param string $cssFileName |
|
| 462 | 456 | * @param &$cssArray |
| 463 | 457 | * |
| 464 | 458 | * @return bool |
@@ -531,10 +525,10 @@ discard block |
||
| 531 | 525 | |
| 532 | 526 | /** |
| 533 | 527 | * @param $time |
| 534 | - * @param $event |
|
| 528 | + * @param integer $event |
|
| 535 | 529 | * @param $msg |
| 536 | - * @param $prefix |
|
| 537 | - * @param $is_decrease |
|
| 530 | + * @param string $prefix |
|
| 531 | + * @param boolean $is_decrease |
|
| 538 | 532 | * @param $fleet_flying_row |
| 539 | 533 | * @param $fleet_flying_sorter |
| 540 | 534 | * @param $fleet_flying_events |
@@ -830,7 +824,7 @@ discard block |
||
| 830 | 824 | } |
| 831 | 825 | |
| 832 | 826 | /** |
| 833 | - * @param template|string $template |
|
| 827 | + * @param template $template |
|
| 834 | 828 | */ |
| 835 | 829 | function templateRenderToHtml($template) { |
| 836 | 830 | $output = null; |
@@ -865,7 +859,7 @@ discard block |
||
| 865 | 859 | * @param template $template |
| 866 | 860 | * @param array|bool $array |
| 867 | 861 | * |
| 868 | - * @return mixed |
|
| 862 | + * @return template |
|
| 869 | 863 | */ |
| 870 | 864 | function templateObjectParse($template, $array = false) { |
| 871 | 865 | global $user; |
@@ -888,7 +882,7 @@ discard block |
||
| 888 | 882 | } |
| 889 | 883 | |
| 890 | 884 | /** |
| 891 | - * @param template|string $template |
|
| 885 | + * @param template $template |
|
| 892 | 886 | * @param array|bool $array |
| 893 | 887 | * |
| 894 | 888 | * @return mixed |
@@ -911,7 +905,7 @@ discard block |
||
| 911 | 905 | } |
| 912 | 906 | |
| 913 | 907 | /** |
| 914 | - * @param array|string $files |
|
| 908 | + * @param string $files |
|
| 915 | 909 | * @param template|null $template |
| 916 | 910 | * @param string|null $template_path - path to template |
| 917 | 911 | * |
@@ -141,6 +141,7 @@ discard block |
||
| 141 | 141 | * LIST - Get fleet list by condition |
| 142 | 142 | * |
| 143 | 143 | * @param string $where_safe |
| 144 | + * @param boolean $for_update |
|
| 144 | 145 | * |
| 145 | 146 | * @return array[] |
| 146 | 147 | */ |
@@ -415,6 +416,7 @@ discard block |
||
| 415 | 416 | * LIST - Get missile attack list by condition |
| 416 | 417 | * |
| 417 | 418 | * @param string $where |
| 419 | + * @param boolean $for_update |
|
| 418 | 420 | * |
| 419 | 421 | * @return array |
| 420 | 422 | */ |
@@ -180,6 +180,10 @@ discard block |
||
| 180 | 180 | * @return bool |
| 181 | 181 | */ |
| 182 | 182 | // OK v4.5 |
| 183 | + |
|
| 184 | + /** |
|
| 185 | + * @param string $account_name_unsafe |
|
| 186 | + */ |
|
| 183 | 187 | public function db_get_by_name($account_name_unsafe) { |
| 184 | 188 | $this->reset(); |
| 185 | 189 | |
@@ -218,6 +222,11 @@ discard block |
||
| 218 | 222 | * |
| 219 | 223 | */ |
| 220 | 224 | // OK v4.5 |
| 225 | + |
|
| 226 | + /** |
|
| 227 | + * @param string $account_name_unsafe |
|
| 228 | + * @param string $email_unsafe |
|
| 229 | + */ |
|
| 221 | 230 | public function db_get_by_name_or_email($account_name_unsafe, $email_unsafe) { |
| 222 | 231 | $this->reset(); |
| 223 | 232 | |
@@ -254,6 +263,13 @@ discard block |
||
| 254 | 263 | * @throws Exception |
| 255 | 264 | */ |
| 256 | 265 | // OK v4.5 |
| 266 | + |
|
| 267 | + /** |
|
| 268 | + * @param string $account_name_unsafe |
|
| 269 | + * @param string $password_raw |
|
| 270 | + * @param string $email_unsafe |
|
| 271 | + * @param string $language_unsafe |
|
| 272 | + */ |
|
| 257 | 273 | public function db_create($account_name_unsafe, $password_raw, $email_unsafe, $language_unsafe = null, $salt_unsafe = null) { |
| 258 | 274 | $this->reset(); |
| 259 | 275 | |
@@ -348,6 +364,11 @@ discard block |
||
| 348 | 364 | * @return int|string |
| 349 | 365 | */ |
| 350 | 366 | // OK 4.8 |
| 367 | + |
|
| 368 | + /** |
|
| 369 | + * @param integer $change_type |
|
| 370 | + * @param double $metamatter |
|
| 371 | + */ |
|
| 351 | 372 | protected function db_mm_log_insert($comment, $change_type, $metamatter, $user_id_unsafe) { |
| 352 | 373 | $provider_id_safe = intval(core_auth::$main_provider->provider_id); |
| 353 | 374 | //$account_id_safe = $this->db->db_escape($this->account_id); |
@@ -388,7 +409,7 @@ discard block |
||
| 388 | 409 | /** |
| 389 | 410 | * @param int $change_type |
| 390 | 411 | * @param float $metamatter |
| 391 | - * @param string|array|bool $comment |
|
| 412 | + * @param string $comment |
|
| 392 | 413 | * @param bool $already_changed |
| 393 | 414 | * |
| 394 | 415 | * @return array|bool|int|mysqli_result|null|string |
@@ -524,6 +545,9 @@ discard block |
||
| 524 | 545 | return false; |
| 525 | 546 | } |
| 526 | 547 | |
| 548 | + /** |
|
| 549 | + * @param string $password |
|
| 550 | + */ |
|
| 527 | 551 | protected function password_encode_for_cookie($password) { |
| 528 | 552 | return md5("{$password}--" . $this->secret_word); |
| 529 | 553 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @param int|string $user_id_unsafe |
| 7 | 7 | * @param bool $for_update |
| 8 | 8 | * @param string $fields |
| 9 | - * @param null $player |
|
| 9 | + * @param null|boolean $player |
|
| 10 | 10 | * |
| 11 | 11 | * @return array|false |
| 12 | 12 | */ |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | return classSupernova::db_get_user_by_username($username_unsafe, $for_update, $fields, $player, $like); |
| 22 | 22 | } |
| 23 | 23 | /** |
| 24 | - * @param $username_unsafe |
|
| 24 | + * @param string $username_unsafe |
|
| 25 | 25 | * @param bool $for_update |
| 26 | 26 | * @param string $fields |
| 27 | 27 | * @param null $player |