@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | /** |
980 | 980 | * Set current resource list from array of units |
981 | 981 | * |
982 | - * @param array $resource_list |
|
982 | + * @param integer[] $resource_list |
|
983 | 983 | */ |
984 | 984 | public function resourcesSet($resource_list) { |
985 | 985 | if (!empty($this->propertiesAdjusted['resource_list'])) { |
@@ -1027,7 +1027,7 @@ discard block |
||
1027 | 1027 | } |
1028 | 1028 | |
1029 | 1029 | /** |
1030 | - * @param array $rate |
|
1030 | + * @param integer[] $rate |
|
1031 | 1031 | * |
1032 | 1032 | * @return float |
1033 | 1033 | */ |
@@ -1058,8 +1058,6 @@ discard block |
||
1058 | 1058 | * Restores fleet or resources to planet |
1059 | 1059 | * |
1060 | 1060 | * @param bool $start |
1061 | - * @param bool $only_resources |
|
1062 | - * @param int $result |
|
1063 | 1061 | */ |
1064 | 1062 | public function resourcesUnload($start = true) { |
1065 | 1063 | sn_db_transaction_check(true); |
@@ -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); |
@@ -213,7 +213,7 @@ |
||
213 | 213 | /** |
214 | 214 | * @param int|string $dbId |
215 | 215 | * |
216 | - * @return V2FleetContainer|false |
|
216 | + * @return V2FleetContainer |
|
217 | 217 | */ |
218 | 218 | public function loadById($dbId) { |
219 | 219 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | /** |
165 | 165 | * @param string $query |
166 | 166 | * |
167 | - * @return mixed|string |
|
167 | + * @return string |
|
168 | 168 | */ |
169 | 169 | public function replaceTablePlaceholders($query) { |
170 | 170 | $sql = $query; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
181 | - * @param $query |
|
181 | + * @param string $query |
|
182 | 182 | */ |
183 | 183 | protected function logQuery($query) { |
184 | 184 | if (!classSupernova::$config->debug) { |
@@ -290,6 +290,7 @@ discard block |
||
290 | 290 | * @param array $fields |
291 | 291 | * @param array $where |
292 | 292 | * @param bool $isOneRecord |
293 | + * @param boolean $forUpdate |
|
293 | 294 | * |
294 | 295 | * @return array|bool|mysqli_result|null |
295 | 296 | * |
@@ -332,6 +333,10 @@ discard block |
||
332 | 333 | |
333 | 334 | // |
334 | 335 | // INSERT/REPLACE ---------------------------------------------------------------------------------------------------- |
336 | + |
|
337 | + /** |
|
338 | + * @param string $query |
|
339 | + */ |
|
335 | 340 | public function doInsertComplex($query) { |
336 | 341 | return $this->doSql($query); |
337 | 342 | } |
@@ -408,7 +413,7 @@ discard block |
||
408 | 413 | * Self-contained - means no params used |
409 | 414 | * Such queries usually used to make large amount of in-base calculations |
410 | 415 | * |
411 | - * @param $query |
|
416 | + * @param string $query |
|
412 | 417 | * |
413 | 418 | * @return array|bool|mysqli_result|null |
414 | 419 | */ |
@@ -425,13 +430,16 @@ discard block |
||
425 | 430 | } |
426 | 431 | |
427 | 432 | /** |
428 | - * @param $DbQuery DbQuery |
|
433 | + * @param DbQuery $DbQuery DbQuery |
|
429 | 434 | */ |
430 | 435 | public function doUpdateDbQueryAdjust($DbQuery) { |
431 | 436 | return $this->doUpdateDbQuery($DbQuery); |
432 | 437 | } |
433 | 438 | |
434 | 439 | |
440 | + /** |
|
441 | + * @param boolean $isOneRecord |
|
442 | + */ |
|
435 | 443 | protected function doUpdateWhere($table, $fieldsSet, $fieldsAdjust = array(), $where = array(), $isOneRecord = DB_RECORDS_ALL, $whereDanger = array()) { |
436 | 444 | $query = DbQuery::build($this) |
437 | 445 | ->setTable($table) |
@@ -450,6 +458,9 @@ discard block |
||
450 | 458 | return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORD_ONE); |
451 | 459 | } |
452 | 460 | |
461 | + /** |
|
462 | + * @param string $table |
|
463 | + */ |
|
453 | 464 | public function doUpdateTableSet($table, $fieldsAndValues, $where = array()) { |
454 | 465 | return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORDS_ALL); |
455 | 466 | } |
@@ -559,6 +570,10 @@ discard block |
||
559 | 570 | // |
560 | 571 | // OTHER FUNCTIONS ---------------------------------------------------------------------------------------------------------- |
561 | 572 | // TODO Заменить это на новый логгер |
573 | + |
|
574 | + /** |
|
575 | + * @param string $query |
|
576 | + */ |
|
562 | 577 | protected function security_watch_user_queries($query) { |
563 | 578 | global $user; |
564 | 579 | |
@@ -582,6 +597,9 @@ discard block |
||
582 | 597 | } |
583 | 598 | |
584 | 599 | |
600 | + /** |
|
601 | + * @param string $query |
|
602 | + */ |
|
585 | 603 | public function security_query_check_bad_words($query) { |
586 | 604 | if ($this->skipQueryCheck) { |
587 | 605 | return; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param string $title |
37 | 37 | * @param string $dest |
38 | 38 | * @param int $time |
39 | - * @param bool|true $show_header |
|
39 | + * @param boolean $show_header |
|
40 | 40 | */ |
41 | 41 | function message($mes, $title = 'Error', $dest = '', $time = 5, $show_header = true) { |
42 | 42 | $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 | */ |
@@ -359,7 +358,7 @@ discard block |
||
359 | 358 | |
360 | 359 | /** |
361 | 360 | * @param $fileList |
362 | - * @param $extension |
|
361 | + * @param string $extension |
|
363 | 362 | * @param $sn_page_name |
364 | 363 | * @param $template_result |
365 | 364 | * |
@@ -387,7 +386,7 @@ discard block |
||
387 | 386 | } |
388 | 387 | |
389 | 388 | /** |
390 | - * @return mixed|string |
|
389 | + * @return string |
|
391 | 390 | */ |
392 | 391 | function calculateFontSize() { |
393 | 392 | $font_size = !empty($_COOKIE[SN_COOKIE_F]) ? $_COOKIE[SN_COOKIE_F] : classSupernova::$user_options[PLAYER_OPTION_BASE_FONT_SIZE]; |
@@ -406,10 +405,10 @@ discard block |
||
406 | 405 | |
407 | 406 | /** |
408 | 407 | * @param $time |
409 | - * @param $event |
|
408 | + * @param integer $event |
|
410 | 409 | * @param $msg |
411 | 410 | * @param $coordinates |
412 | - * @param $is_decrease |
|
411 | + * @param boolean $is_decrease |
|
413 | 412 | * @param Fleet $objFleet |
414 | 413 | * @param $fleet_flying_sorter |
415 | 414 | * @param $fleet_flying_events |
@@ -733,7 +732,7 @@ discard block |
||
733 | 732 | } |
734 | 733 | |
735 | 734 | /** |
736 | - * @param array|string $files |
|
735 | + * @param string $files |
|
737 | 736 | * @param template|bool $template |
738 | 737 | * @param string|bool $template_path |
739 | 738 | * |