@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | * Рассчёт бонуса ММ |
688 | 688 | * |
689 | 689 | * @param $dark_matter |
690 | - * @param bool|true $direct |
|
690 | + * @param boolean $direct |
|
691 | 691 | * @param bool|false $return_bonus |
692 | 692 | * |
693 | 693 | * @return float|int |
@@ -723,6 +723,12 @@ discard block |
||
723 | 723 | |
724 | 724 | // Дополнительная ре-трансляция адреса, если в каком-то случае платежная система ожидает нелогичный ответ |
725 | 725 | // Пример: иксолла при неправильно заданном пользователе в ордере ожидает НЕПРАВИЛЬНЫЙ_ОРДЕР, а не НЕПРАВИЛЬНЫЙ_ПОЛЬЗОВАТЕЛЬ |
726 | + |
|
727 | + /** |
|
728 | + * @param integer $error_code |
|
729 | + * |
|
730 | + * @return integer|null |
|
731 | + */ |
|
726 | 732 | public function retranslate_error($error_code, $options = array()) { |
727 | 733 | return isset($options['retranslate_error'][$error_code]) ? $options['retranslate_error'][$error_code] : $error_code; |
728 | 734 | } |
@@ -134,6 +134,9 @@ discard block |
||
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | + /** |
|
138 | + * @param string $filter |
|
139 | + */ |
|
137 | 140 | public function queryCacheSetByFilter($location_type, $filter, $record_id) { |
138 | 141 | $this->queries[$location_type][$filter][$record_id] = &$this->getDataRefByLocationAndId($location_type, $record_id); |
139 | 142 | } |
@@ -173,14 +176,23 @@ discard block |
||
173 | 176 | return true; // Не всегда - от результата |
174 | 177 | } |
175 | 178 | |
179 | + /** |
|
180 | + * @param integer $locationType |
|
181 | + */ |
|
176 | 182 | public function getData($locationType = LOC_NONE) { |
177 | 183 | return $locationType == LOC_NONE ? $this->data : $this->data[$locationType]; |
178 | 184 | } |
179 | 185 | |
186 | + /** |
|
187 | + * @param integer $locationType |
|
188 | + */ |
|
180 | 189 | public function cacheUnsetElement($locationType, $recordId) { |
181 | 190 | $this->data[$locationType][$recordId] = null; |
182 | 191 | } |
183 | 192 | |
193 | + /** |
|
194 | + * @param integer $locationType |
|
195 | + */ |
|
184 | 196 | public function isArrayLocation($locationType) { |
185 | 197 | return is_array($this->data[$locationType]); |
186 | 198 | } |
@@ -204,6 +216,9 @@ discard block |
||
204 | 216 | } |
205 | 217 | } |
206 | 218 | |
219 | + /** |
|
220 | + * @param integer $unit_snid |
|
221 | + */ |
|
207 | 222 | public function getUnitLocator($location_type, $location_id, $unit_snid) { |
208 | 223 | return $unit_snid ? $this->locator[LOC_UNIT][$location_type][$location_id][$unit_snid] : $this->locator[LOC_UNIT][$location_type][$location_id]; |
209 | 224 | } |
@@ -236,14 +251,23 @@ discard block |
||
236 | 251 | return $this->locks; |
237 | 252 | } |
238 | 253 | |
254 | + /** |
|
255 | + * @param string $filter |
|
256 | + */ |
|
239 | 257 | public function getQueriesByLocationAndFilter($locationType, $filter) { |
240 | 258 | return !empty($this->queries[$locationType][$filter]) && is_array($this->queries[$locationType][$filter]) ? $this->queries[$locationType][$filter] : array(); |
241 | 259 | } |
242 | 260 | |
261 | + /** |
|
262 | + * @param string $filter |
|
263 | + */ |
|
243 | 264 | public function isQueryCacheByLocationAndFilterEmpty($locationType, $filter) { |
244 | 265 | return !isset($this->queries[$locationType][$filter]) || $this->queries[$locationType][$filter] === null; |
245 | 266 | } |
246 | 267 | |
268 | + /** |
|
269 | + * @param string $filter |
|
270 | + */ |
|
247 | 271 | public function queryCacheResetByLocationAndFilter($locationType, $filter) { |
248 | 272 | $this->queries[$locationType][$filter] = array(); |
249 | 273 | } |
@@ -426,6 +426,9 @@ discard block |
||
426 | 426 | } |
427 | 427 | |
428 | 428 | |
429 | + /** |
|
430 | + * @param integer $location_type |
|
431 | + */ |
|
429 | 432 | public function db_ins_field_set($location_type, $field_set) { |
430 | 433 | $table_name = static::$location_info[$location_type][P_TABLE_NAME]; |
431 | 434 | $result = $this->db->doInsertSet($table_name, $field_set); |
@@ -450,7 +453,7 @@ discard block |
||
450 | 453 | /** |
451 | 454 | * Блокирует указанные таблицу/список таблиц |
452 | 455 | * |
453 | - * @param string|array $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
456 | + * @param string $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
454 | 457 | * <p>string - название таблицы для блокировки</p> |
455 | 458 | * <p>array - массив, где ключ - имя таблицы, а значение - условия блокировки элементов</p> |
456 | 459 | */ |
@@ -97,6 +97,7 @@ |
||
97 | 97 | /** |
98 | 98 | * Set custom template location (able to use directory outside of phpBB) |
99 | 99 | * @access public |
100 | + * @param string $template_path |
|
100 | 101 | */ |
101 | 102 | public function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
102 | 103 | { |
@@ -45,6 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | /** |
47 | 47 | * constuctor |
48 | + * @param template $template |
|
48 | 49 | */ |
49 | 50 | public function template_compile(&$template) |
50 | 51 | { |
@@ -456,6 +457,7 @@ discard block |
||
456 | 457 | * Compile IF tags - much of this is from Smarty with |
457 | 458 | * some adaptions for our block level methods |
458 | 459 | * @access private |
460 | + * @param boolean $elseif |
|
459 | 461 | */ |
460 | 462 | public function compile_tag_if($tag_args, $elseif) |
461 | 463 | { |
@@ -613,6 +615,7 @@ discard block |
||
613 | 615 | /** |
614 | 616 | * Compile DEFINE tags |
615 | 617 | * @access private |
618 | + * @param boolean $op |
|
616 | 619 | */ |
617 | 620 | public function compile_tag_define($tag_args, $op) |
618 | 621 | { |
@@ -691,6 +694,7 @@ discard block |
||
691 | 694 | * parse expression |
692 | 695 | * This is from Smarty |
693 | 696 | * @access private |
697 | + * @param string $is_arg |
|
694 | 698 | */ |
695 | 699 | public function _parse_is_expr($is_arg, $tokens) |
696 | 700 | { |
@@ -788,6 +792,8 @@ discard block |
||
788 | 792 | * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
789 | 793 | * NOTE: does not expect a trailing "." on the blockname. |
790 | 794 | * @access private |
795 | + * @param string $blockname |
|
796 | + * @param boolean $include_last_iterator |
|
791 | 797 | */ |
792 | 798 | public function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
793 | 799 | { |
@@ -826,6 +832,7 @@ discard block |
||
826 | 832 | /** |
827 | 833 | * Write compiled file to cache directory |
828 | 834 | * @access private |
835 | + * @param string $data |
|
829 | 836 | */ |
830 | 837 | public function compile_write($handle, $data) |
831 | 838 | { |
@@ -850,6 +857,7 @@ discard block |
||
850 | 857 | // Gorlum's minifier BOF |
851 | 858 | /** |
852 | 859 | * Minifies template w/i PHP code by removing extra spaces |
860 | + * @return string |
|
853 | 861 | */ |
854 | 862 | private function minify($html) |
855 | 863 | { |
@@ -39,6 +39,9 @@ |
||
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param integer $snId |
|
44 | + */ |
|
42 | 45 | public function unitAdd($snId, $level) { |
43 | 46 | $unit = $this->unitModel->buildContainer(); |
44 | 47 | $unit->snId = $snId; |
@@ -176,6 +176,11 @@ discard block |
||
176 | 176 | */ |
177 | 177 | // OK v4 |
178 | 178 | // TODO - вынести в отдельный класс |
179 | +/** |
|
180 | + * @param string $db_id_field_name |
|
181 | + * @param string $db_table_name |
|
182 | + * @param string $db_value_field_name |
|
183 | + */ |
|
179 | 184 | function db_get_set_unique_id_value($current_value_unsafe, $db_id_field_name, $db_table_name, $db_value_field_name) { |
180 | 185 | $current_value_safe = db_escape($current_value_unsafe); |
181 | 186 | $value_id = classSupernova::$db->doSelectFetchArray("SELECT `{$db_id_field_name}` FROM {{{$db_table_name}}} WHERE `{$db_value_field_name}` = '{$current_value_safe}' LIMIT 1 FOR UPDATE"); |
@@ -509,8 +514,8 @@ discard block |
||
509 | 514 | |
510 | 515 | |
511 | 516 | /** |
512 | - * @param $user_id |
|
513 | - * @param $change_type |
|
517 | + * @param integer $user_id |
|
518 | + * @param integer $change_type |
|
514 | 519 | * @param $dark_matter |
515 | 520 | * @param $comment_unsafe |
516 | 521 | * @param $rowUserNameUnsafe |
@@ -531,7 +536,7 @@ discard block |
||
531 | 536 | /** |
532 | 537 | * @param $user_id_safe |
533 | 538 | * |
534 | - * @return array|bool|mysqli_result|null |
|
539 | + * @return integer |
|
535 | 540 | */ |
536 | 541 | function db_referral_get_by_id($user_id_safe) { |
537 | 542 | $old_referral = classSupernova::$db->doSelectFetchArray("SELECT * FROM {{referrals}} WHERE `id` = {$user_id_safe} LIMIT 1 FOR UPDATE;"); |
@@ -571,9 +576,9 @@ discard block |
||
571 | 576 | |
572 | 577 | // Quests *********************************************************************************************************** |
573 | 578 | /** |
574 | - * @param $query_add_select |
|
579 | + * @param string $query_add_select |
|
575 | 580 | * @param $query_add_from |
576 | - * @param $query_add_where |
|
581 | + * @param string $query_add_where |
|
577 | 582 | * |
578 | 583 | * @return array|bool|mysqli_result|null |
579 | 584 | */ |
@@ -617,11 +622,11 @@ discard block |
||
617 | 622 | } |
618 | 623 | |
619 | 624 | /** |
620 | - * @param $quest_name_unsafe |
|
621 | - * @param $quest_type |
|
622 | - * @param $quest_description_unsafe |
|
625 | + * @param string $quest_name_unsafe |
|
626 | + * @param integer $quest_type |
|
627 | + * @param string $quest_description_unsafe |
|
623 | 628 | * @param $quest_conditions |
624 | - * @param $quest_rewards |
|
629 | + * @param string $quest_rewards |
|
625 | 630 | * @param $quest_id |
626 | 631 | */ |
627 | 632 | function db_quest_update($quest_name_unsafe, $quest_type, $quest_description_unsafe, $quest_conditions, $quest_rewards, $quest_id) { |
@@ -705,7 +710,7 @@ discard block |
||
705 | 710 | |
706 | 711 | /** |
707 | 712 | * @param $payment_id |
708 | - * @param $payment_status |
|
713 | + * @param integer $payment_status |
|
709 | 714 | * @param $comment_unsafe |
710 | 715 | */ |
711 | 716 | function db_payment_update($payment_id, $payment_status, $comment_unsafe) { |
@@ -12,6 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * 1.0 - copyright (c) 2010 by Gorlum for http://supernova.ws |
14 | 14 | * @version 1.0 |
15 | + * @param integer $lab_require |
|
15 | 16 | */ |
16 | 17 | function eco_get_lab_max_effective_level(&$user, $lab_require) { |
17 | 18 | if (!$user['user_as_ally'] && !isset($user['laboratories_active'])) { |
@@ -182,6 +183,9 @@ discard block |
||
182 | 183 | return $result; |
183 | 184 | } |
184 | 185 | |
186 | +/** |
|
187 | + * @param integer[] $unit_list |
|
188 | + */ |
|
185 | 189 | function eco_is_builds_in_que($planet_que, $unit_list) { |
186 | 190 | $eco_is_builds_in_que = false; |
187 | 191 |
@@ -12,6 +12,9 @@ |
||
12 | 12 | use DBStatic\DBStaticPlanet; |
13 | 13 | use DBStatic\DBStaticUser; |
14 | 14 | |
15 | +/** |
|
16 | + * @param integer $UpdateTime |
|
17 | + */ |
|
15 | 18 | function sys_o_get_updated($user, $planet, $UpdateTime, $simulation = false, $no_user_update = false) { |
16 | 19 | sn_db_transaction_check(true); |
17 | 20 |