Completed
Push — work-fleets ( 29b14b...6b7253 )
by SuperNova.WS
05:46
created
includes/classes/DBStaticMessages.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -470,6 +470,12 @@
 block discarded – undo
470 470
   {$StartRec}, 25;");
471 471
   }
472 472
 
473
+  /**
474
+   * @param integer $message_type
475
+   * @param string $from
476
+   * @param string $subject
477
+   * @param string $text
478
+   */
473 479
   public static function db_message_insert_all($message_type, $from, $subject, $text) {
474 480
     return doquery($QryInsertMessage = 'INSERT INTO {{messages}} (`message_owner`, `message_sender`, `message_time`, `message_type`, `message_from`, `message_subject`, `message_text`) ' .
475 481
       "SELECT `id`, 0, unix_timestamp(now()), {$message_type}, '{$from}', '{$subject}', '{$text}' FROM {{users}}");
Please login to merge, or discard this patch.
includes/classes/DBStaticUser.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@  discard block
 block discarded – undo
131 131
     );
132 132
   }
133 133
 
134
+  /**
135
+   * @param integer $config_user_birthday_range
136
+   */
134 137
   public static function db_user_list_to_celebrate($config_user_birthday_range) {
135 138
 //    $query = "SELECT
136 139
 //        `id`, `username`, `user_birthday`, `user_birthday_celebrated`,
@@ -208,6 +211,9 @@  discard block
 block discarded – undo
208 211
   }
209 212
 
210 213
 
214
+  /**
215
+   * @param string $username_unsafe
216
+   */
211 217
   public static function db_user_by_username($username_unsafe, $for_update = false, $fields = '*', $player = null, $like = false) {
212 218
     return classSupernova::db_get_user_by_username($username_unsafe, $for_update, $fields, $player, $like);
213 219
   }
@@ -220,6 +226,9 @@  discard block
 block discarded – undo
220 226
     return classSupernova::db_upd_record_by_id(LOC_USER, $user_id, $set);
221 227
   }
222 228
 
229
+  /**
230
+   * @param boolean $player
231
+   */
223 232
   public static function db_user_by_id($user_id_unsafe, $for_update = false, $fields = '*', $player = null) {
224 233
     return classSupernova::db_get_user_by_id($user_id_unsafe, $for_update, $fields, $player);
225 234
   }
Please login to merge, or discard this patch.
includes/general.php 1 patch
Doc Comments   +28 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 require_once('general_pname.php');
13 13
 
14 14
 /**
15
- * @param       $func_name
15
+ * @param       string $func_name
16 16
  * @param array $func_arg
17 17
  *
18 18
  * @return mixed
@@ -63,6 +63,9 @@  discard block
 block discarded – undo
63 63
 }
64 64
 
65 65
 // ----------------------------------------------------------------------------------------------------------------
66
+/**
67
+ * @param string $filename
68
+ */
66 69
 function sys_file_read($filename) {
67 70
   return @file_get_contents($filename);
68 71
 }
@@ -105,7 +108,7 @@  discard block
 block discarded – undo
105 108
 /**
106 109
  * Получение курса обмены валюты в серверную валюту
107 110
  *
108
- * @param $currency_symbol
111
+ * @param string $currency_symbol
109 112
  *
110 113
  * @return float
111 114
  */
@@ -146,7 +149,7 @@  discard block
 block discarded – undo
146 149
  * @param float     $n
147 150
  * @param int|bool  $floor
148 151
  * @param int|bool  $color
149
- * @param int|bool  $limit
152
+ * @param boolean  $limit
150 153
  * @param bool|null $style
151 154
  *
152 155
  * @return array|float|string
@@ -239,6 +242,9 @@  discard block
 block discarded – undo
239 242
   return preg_replace($ListCensure, '*', $String);
240 243
 }
241 244
 
245
+/**
246
+ * @param string $email
247
+ */
242 248
 function is_email($email) {
243 249
   return (preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i", $email));
244 250
 }
@@ -276,6 +282,9 @@  discard block
 block discarded – undo
276 282
   return floatval(sys_get_param($param_name, $default));
277 283
 }
278 284
 
285
+/**
286
+ * @param string $param_name
287
+ */
279 288
 function sys_get_param_escaped($param_name, $default = '') {
280 289
   return db_escape(sys_get_param($param_name, $default));
281 290
 }
@@ -444,6 +453,9 @@  discard block
 block discarded – undo
444 453
 }
445 454
 
446 455
 // Generates random string of $length symbols from $allowed_chars charset
456
+/**
457
+ * @param string $allowed_chars
458
+ */
447 459
 function sys_random_string($length = 16, $allowed_chars = SN_SYS_SEC_CHARS_ALLOWED) {
448 460
   $allowed_length = strlen($allowed_chars);
449 461
 
@@ -548,6 +560,10 @@  discard block
 block discarded – undo
548 560
   return implode(';', $fleet_string);
549 561
 }
550 562
 
563
+/**
564
+ * @param string $title
565
+ * @param string $body
566
+ */
551 567
 function mymail($email_unsafe, $title, $body, $from = '', $html = false) {
552 568
   $from = trim($from ? $from : classSupernova::$config->game_adminEmail);
553 569
 
@@ -806,6 +822,9 @@  discard block
 block discarded – undo
806 822
   return serialize($nick_array);
807 823
 }
808 824
 
825
+/**
826
+ * @param string $nick_string
827
+ */
809 828
 function player_nick_uncompact($nick_string) {
810 829
   try {
811 830
     $result = unserialize($nick_string);
@@ -1047,6 +1066,9 @@  discard block
 block discarded – undo
1047 1066
   return $ranks;
1048 1067
 }
1049 1068
 
1069
+/**
1070
+ * @param boolean $planet_id
1071
+ */
1050 1072
 function sys_player_new_adjust($user_id, $planet_id) { return sn_function_call(__FUNCTION__, array($user_id, $planet_id, &$result)); }
1051 1073
 
1052 1074
 function sn_sys_player_new_adjust($user_id, $planet_id, &$result) {
@@ -1363,6 +1385,9 @@  discard block
 block discarded – undo
1363 1385
   return version_compare(sn_version_compare_extra($ver1), sn_version_compare_extra($ver2));
1364 1386
 }
1365 1387
 
1388
+/**
1389
+ * @param string $name
1390
+ */
1366 1391
 function sn_setcookie($name, $value = null, $expire = null, $path = SN_ROOT_RELATIVE, $domain = null, $secure = null, $httponly = null) {
1367 1392
   $_COOKIE[$name] = $value;
1368 1393
 
Please login to merge, or discard this patch.
includes/classes/db_mysql.php 1 patch
Doc Comments   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
   /**
125 125
    * @param string $query
126 126
    *
127
-   * @return mixed|string
127
+   * @return string
128 128
    */
129 129
   public function replaceTablePlaceholders($query) {
130 130
     $sql = $query;
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
   }
139 139
 
140 140
   /**
141
-   * @param       $query
142
-   * @param       $fetch
141
+   * @param       string $query
142
+   * @param       boolean $fetch
143 143
    */
144 144
   protected function logQuery($query, $fetch) {
145 145
     if (!classSupernova::$config->debug) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
   /**
181 181
    * @param string|DbSqlStatement $statement
182 182
    *
183
-   * @return array|bool|mysqli_result|null
183
+   * @return mysqli_result
184 184
    */
185 185
   public function execOld($statement) {
186 186
     return $this->doquery($statement);
@@ -361,6 +361,10 @@  discard block
 block discarded – undo
361 361
   }
362 362
 
363 363
   // TODO Заменить это на новый логгер
364
+
365
+  /**
366
+   * @param string $query
367
+   */
364 368
   protected function security_watch_user_queries($query) {
365 369
     global $user;
366 370
 
@@ -384,6 +388,9 @@  discard block
 block discarded – undo
384 388
   }
385 389
 
386 390
 
391
+  /**
392
+   * @param string $query
393
+   */
387 394
   public function security_query_check_bad_words($query, $skip_query_check = false) {
388 395
     if ($skip_query_check) {
389 396
       return;
Please login to merge, or discard this patch.
includes/classes/DbSqlPrepare.php 1 patch
Doc Comments   +10 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,6 +100,9 @@  discard block
 block discarded – undo
100 100
   }
101 101
 
102 102
 
103
+  /**
104
+   * @param string $query
105
+   */
103 106
   public function setQuery($query) {
104 107
     $this->query = $query;
105 108
 
@@ -113,6 +116,9 @@  discard block
 block discarded – undo
113 116
     }
114 117
   }
115 118
 
119
+  /**
120
+   * @param string $comment
121
+   */
116 122
   protected function commentAdd($comment) {
117 123
     if (empty($this->values[static::COMMENT_PLACEHOLDER])) {
118 124
       $this->query .= static::COMMENT_PLACEHOLDER;
@@ -243,12 +249,15 @@  discard block
 block discarded – undo
243 249
     return $this;
244 250
   }
245 251
 
252
+  /**
253
+   * @return mysqli_result
254
+   */
246 255
   public function getResult() {
247 256
     return $this->statement->get_result();
248 257
   }
249 258
 
250 259
   /**
251
-   * @return bool|mysqli_result
260
+   * @return DBMysqliStatementIterator
252 261
    */
253 262
   public function getIterator() {
254 263
     return new DBMysqliStatementIterator($this->statement);
Please login to merge, or discard this patch.