@@ -40,6 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | + * @param string $fields |
|
43 | 44 | * @return DbResultIterator |
44 | 45 | */ |
45 | 46 | protected static function playerSelectIterator($fields, $orderBy = '', $forUpdate = false, $groupHaving = '', $where = '', $limit = '') { |
@@ -134,6 +135,9 @@ discard block |
||
134 | 135 | return $result; |
135 | 136 | } |
136 | 137 | |
138 | + /** |
|
139 | + * @param integer $config_user_birthday_range |
|
140 | + */ |
|
137 | 141 | public static function db_user_list_to_celebrate($config_user_birthday_range) { |
138 | 142 | $query = "SELECT |
139 | 143 | `id`, `username`, `user_birthday`, `user_birthday_celebrated`, |
@@ -213,6 +217,9 @@ discard block |
||
213 | 217 | return $user_list; |
214 | 218 | } |
215 | 219 | |
220 | + /** |
|
221 | + * @param string $username_unsafe |
|
222 | + */ |
|
216 | 223 | public static function db_user_by_username($username_unsafe, $for_update = false, $fields = '*', $player = null, $like = false) { |
217 | 224 | // TODO Проверить, кстати - а везде ли нужно выбирать юзеров или где-то все-таки ищутся Альянсы ? |
218 | 225 | if (!($username_unsafe = trim($username_unsafe))) { |
@@ -266,7 +273,6 @@ discard block |
||
266 | 273 | |
267 | 274 | /** |
268 | 275 | * @param $user_id |
269 | - * @param array $set |
|
270 | 276 | * @param array $adjust |
271 | 277 | * |
272 | 278 | * @return array|bool|mysqli_result|null |
@@ -283,8 +289,8 @@ discard block |
||
283 | 289 | * <p>array - запись пользователя с установленным полем ['id']</p> |
284 | 290 | * @param bool $for_update @deprecated |
285 | 291 | * @param string $fields @deprecated список полей или '*'/'' для всех полей |
286 | - * @param null $player |
|
287 | - * @param bool|null $player Признак выбора записи пользователь типа "игрок" |
|
292 | + * @param boolean $player |
|
293 | + * @param boolean $player Признак выбора записи пользователь типа "игрок" |
|
288 | 294 | * <p>null - Можно выбрать запись любого типа</p> |
289 | 295 | * <p>true - Выбирается только запись типа "игрок"</p> |
290 | 296 | * <p>false - Выбирается только запись типа "альянс"</p> |
@@ -187,6 +187,9 @@ |
||
187 | 187 | return $error_backtrace; |
188 | 188 | } |
189 | 189 | |
190 | + /** |
|
191 | + * @param string $die_message |
|
192 | + */ |
|
190 | 193 | public function error_fatal($die_message, $details = 'There is a fatal error on page') { |
191 | 194 | // TODO - Записывать детали ошибки в лог-файл |
192 | 195 | die($die_message); |
@@ -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 |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | * Рассчёт бонуса ММ |
703 | 703 | * |
704 | 704 | * @param $dark_matter |
705 | - * @param bool|true $direct |
|
705 | + * @param boolean $direct |
|
706 | 706 | * @param bool|false $return_bonus |
707 | 707 | * |
708 | 708 | * @return float|int |
@@ -738,6 +738,12 @@ discard block |
||
738 | 738 | |
739 | 739 | // Дополнительная ре-трансляция адреса, если в каком-то случае платежная система ожидает нелогичный ответ |
740 | 740 | // Пример: иксолла при неправильно заданном пользователе в ордере ожидает НЕПРАВИЛЬНЫЙ_ОРДЕР, а не НЕПРАВИЛЬНЫЙ_ПОЛЬЗОВАТЕЛЬ |
741 | + |
|
742 | + /** |
|
743 | + * @param integer $error_code |
|
744 | + * |
|
745 | + * @return integer|null |
|
746 | + */ |
|
741 | 747 | function retranslate_error($error_code, $options = array()) { |
742 | 748 | return isset($options['retranslate_error'][$error_code]) ? $options['retranslate_error'][$error_code] : $error_code; |
743 | 749 | } |
@@ -121,6 +121,9 @@ discard block |
||
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param string $filter |
|
126 | + */ |
|
124 | 127 | public static function queryCacheSetByFilter($location_type, $filter, $record_id) { |
125 | 128 | SnCache::$queries[$location_type][$filter][$record_id] = &SnCache::getDataRefByLocationAndId($location_type, $record_id); |
126 | 129 | } |
@@ -160,14 +163,23 @@ discard block |
||
160 | 163 | return true; // Не всегда - от результата |
161 | 164 | } |
162 | 165 | |
166 | + /** |
|
167 | + * @param integer $locationType |
|
168 | + */ |
|
163 | 169 | public static function getData($locationType = LOC_NONE) { |
164 | 170 | return $locationType == LOC_NONE ? static::$data : static::$data[$locationType]; |
165 | 171 | } |
166 | 172 | |
173 | + /** |
|
174 | + * @param integer $locationType |
|
175 | + */ |
|
167 | 176 | public static function cacheUnsetElement($locationType, $recordId) { |
168 | 177 | static::$data[$locationType][$recordId] = null; |
169 | 178 | } |
170 | 179 | |
180 | + /** |
|
181 | + * @param integer $locationType |
|
182 | + */ |
|
171 | 183 | public static function isArrayLocation($locationType) { |
172 | 184 | return is_array(static::$data[$locationType]); |
173 | 185 | } |
@@ -190,6 +202,9 @@ discard block |
||
190 | 202 | } |
191 | 203 | } |
192 | 204 | |
205 | + /** |
|
206 | + * @param integer $unit_snid |
|
207 | + */ |
|
193 | 208 | public static function getUnitLocator($location_type, $location_id, $unit_snid) { |
194 | 209 | return $unit_snid ? static::$locator[LOC_UNIT][$location_type][$location_id][$unit_snid] : static::$locator[LOC_UNIT][$location_type][$location_id]; |
195 | 210 | } |
@@ -222,14 +237,23 @@ discard block |
||
222 | 237 | return static::$locks; |
223 | 238 | } |
224 | 239 | |
240 | + /** |
|
241 | + * @param string $filter |
|
242 | + */ |
|
225 | 243 | public static function getQueriesByLocationAndFilter($locationType, $filter) { |
226 | 244 | return !empty(static::$queries[$locationType][$filter]) && is_array(static::$queries[$locationType][$filter]) ? static::$queries[$locationType][$filter] : array(); |
227 | 245 | } |
228 | 246 | |
247 | + /** |
|
248 | + * @param string $filter |
|
249 | + */ |
|
229 | 250 | public static function isQueryCacheByLocationAndFilterEmpty($locationType, $filter) { |
230 | 251 | return !isset(SnCache::$queries[$locationType][$filter]) || SnCache::$queries[$locationType][$filter] === null; |
231 | 252 | } |
232 | 253 | |
254 | + /** |
|
255 | + * @param string $filter |
|
256 | + */ |
|
233 | 257 | public static function queryCacheResetByLocationAndFilter($locationType, $filter) { |
234 | 258 | SnCache::$queries[$locationType][$filter] = array(); |
235 | 259 | } |
@@ -314,6 +314,9 @@ discard block |
||
314 | 314 | return $result; |
315 | 315 | } |
316 | 316 | |
317 | + /** |
|
318 | + * @param integer $location_type |
|
319 | + */ |
|
317 | 320 | public static function db_ins_field_set($location_type, $field_set, $serialize = false) { |
318 | 321 | // TODO multiinsert |
319 | 322 | !sn_db_field_set_is_safe($field_set) ? $field_set = sn_db_field_set_make_safe($field_set, $serialize) : false; |
@@ -350,7 +353,7 @@ discard block |
||
350 | 353 | /** |
351 | 354 | * Блокирует указанные таблицу/список таблиц |
352 | 355 | * |
353 | - * @param string|array $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
356 | + * @param string $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
354 | 357 | * <p>string - название таблицы для блокировки</p> |
355 | 358 | * <p>array - массив, где ключ - имя таблицы, а значение - условия блокировки элементов</p> |
356 | 359 | */ |
@@ -103,6 +103,7 @@ |
||
103 | 103 | /** |
104 | 104 | * Set custom template location (able to use directory outside of phpBB) |
105 | 105 | * @access public |
106 | + * @param string $template_path |
|
106 | 107 | */ |
107 | 108 | function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
108 | 109 | { |
@@ -47,6 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | /** |
49 | 49 | * constuctor |
50 | + * @param template $template |
|
50 | 51 | */ |
51 | 52 | function template_compile(&$template) |
52 | 53 | { |
@@ -463,6 +464,7 @@ discard block |
||
463 | 464 | * Compile IF tags - much of this is from Smarty with |
464 | 465 | * some adaptions for our block level methods |
465 | 466 | * @access private |
467 | + * @param boolean $elseif |
|
466 | 468 | */ |
467 | 469 | function compile_tag_if($tag_args, $elseif) |
468 | 470 | { |
@@ -620,6 +622,7 @@ discard block |
||
620 | 622 | /** |
621 | 623 | * Compile DEFINE tags |
622 | 624 | * @access private |
625 | + * @param boolean $op |
|
623 | 626 | */ |
624 | 627 | function compile_tag_define($tag_args, $op) |
625 | 628 | { |
@@ -698,6 +701,7 @@ discard block |
||
698 | 701 | * parse expression |
699 | 702 | * This is from Smarty |
700 | 703 | * @access private |
704 | + * @param string $is_arg |
|
701 | 705 | */ |
702 | 706 | function _parse_is_expr($is_arg, $tokens) |
703 | 707 | { |
@@ -794,6 +798,8 @@ discard block |
||
794 | 798 | * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
795 | 799 | * NOTE: does not expect a trailing "." on the blockname. |
796 | 800 | * @access private |
801 | + * @param string $blockname |
|
802 | + * @param boolean $include_last_iterator |
|
797 | 803 | */ |
798 | 804 | function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
799 | 805 | { |
@@ -832,6 +838,7 @@ discard block |
||
832 | 838 | /** |
833 | 839 | * Write compiled file to cache directory |
834 | 840 | * @access private |
841 | + * @param string $data |
|
835 | 842 | */ |
836 | 843 | function compile_write($handle, $data) |
837 | 844 | { |
@@ -857,6 +864,7 @@ discard block |
||
857 | 864 | /** |
858 | 865 | * Minifies template w/i PHP code by removing extra spaces |
859 | 866 | * @access private |
867 | + * @return string |
|
860 | 868 | */ |
861 | 869 | function minify($html) |
862 | 870 | { |
@@ -118,7 +118,7 @@ |
||
118 | 118 | * @param mixed $offset <p> |
119 | 119 | * The offset to assign the value to. |
120 | 120 | * </p> |
121 | - * @param mixed $value <p> |
|
121 | + * @param Unit $value <p> |
|
122 | 122 | * The value to set. |
123 | 123 | * </p> |
124 | 124 | * |