@@ -50,8 +50,8 @@ |
||
50 | 50 | |
51 | 51 | /** |
52 | 52 | * @param template $template |
53 | - * @param $query_where |
|
54 | - * @param $query_limit |
|
53 | + * @param string $query_where |
|
54 | + * @param integer $query_limit |
|
55 | 55 | * |
56 | 56 | * @return array|bool|mysqli_result|null |
57 | 57 | */ |
@@ -21,11 +21,19 @@ discard block |
||
21 | 21 | return empty($result) ? null : $result; |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @param integer $galaxy |
|
26 | + * @param integer $system |
|
27 | + * @param integer $planet |
|
28 | + */ |
|
24 | 29 | public static function db_planet_by_gspt_safe($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
25 | 30 | return classSupernova::db_get_record_list(LOC_PLANET, |
26 | 31 | "{{planets}}.`galaxy` = {$galaxy} AND {{planets}}.`system` = {$system} AND {{planets}}.`planet` = {$planet} AND {{planets}}.`planet_type` = {$planet_type}", true); |
27 | 32 | } |
28 | 33 | |
34 | + /** |
|
35 | + * @param integer $planet_type |
|
36 | + */ |
|
29 | 37 | public static function db_planet_by_gspt($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
30 | 38 | $galaxy = intval($galaxy); |
31 | 39 | $system = intval($system); |
@@ -120,6 +128,9 @@ discard block |
||
120 | 128 | "`id_owner` = '{$user_row['id']}' {$conditions} ORDER BY {$order_by}"); |
121 | 129 | } |
122 | 130 | |
131 | + /** |
|
132 | + * @param integer $planet_id |
|
133 | + */ |
|
123 | 134 | public static function db_planet_list_by_user_or_planet($user_id, $planet_id) { |
124 | 135 | if(!($user_id = idval($user_id)) && !($planet_id = idval($planet_id))) { |
125 | 136 | return false; |
@@ -138,6 +149,9 @@ discard block |
||
138 | 149 | return classSupernova::db_upd_record_by_id(LOC_PLANET, $planet_id, $set); |
139 | 150 | } |
140 | 151 | |
152 | + /** |
|
153 | + * @param integer $ui_planet_type |
|
154 | + */ |
|
141 | 155 | public static function db_planet_set_by_gspt($ui_galaxy, $ui_system, $ui_planet, $ui_planet_type = PT_ALL, $set) { |
142 | 156 | if(!($set = trim($set))) { |
143 | 157 | return false; |
@@ -118,6 +118,9 @@ |
||
118 | 118 | return classSupernova::$gc->cacheOperator->db_ins_record(LOC_UNIT, $set); |
119 | 119 | } |
120 | 120 | |
121 | + /** |
|
122 | + * @param integer $unit_location_type |
|
123 | + */ |
|
121 | 124 | public static function db_unit_list_delete($user_id = 0, $unit_location_type, $unit_location_id = 0, $unit_snid = 0) { |
122 | 125 | $where = array('unit_location_type' => $unit_location_type); |
123 | 126 | ($unit_location_id = idval($unit_location_id)) ? $where['unit_location_id'] = $unit_location_id : false; |
@@ -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> |
@@ -18,6 +18,7 @@ |
||
18 | 18 | protected $unitBySnId; |
19 | 19 | |
20 | 20 | /** |
21 | + * @param integer $locationType |
|
21 | 22 | */ |
22 | 23 | public function load($locationType, $locationId) { |
23 | 24 |