@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | |
821 | 821 | |
822 | 822 | /** |
823 | - * @return int |
|
823 | + * @return boolean |
|
824 | 824 | */ |
825 | 825 | protected function checkExpeditionsMax() { |
826 | 826 | return get_player_max_expeditons($this->fleet->dbOwnerRow) > 0; |
@@ -920,6 +920,10 @@ discard block |
||
920 | 920 | $this->checkMissionExact($missionType); |
921 | 921 | } |
922 | 922 | |
923 | + /** |
|
924 | + * @param integer $missionType |
|
925 | + * @param boolean $result |
|
926 | + */ |
|
923 | 927 | protected function checkMissionResultAndUnset($missionType, $result, $forceMission = false) { |
924 | 928 | $this->unsetMission($missionType, $result, $forceMission); |
925 | 929 |
@@ -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; |