Completed
Push — work-fleets ( 9e987d...ec9dc8 )
by SuperNova.WS
06:04
created
includes/db.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@  discard block
 block discarded – undo
16 16
  * @param       $user
17 17
  * @param       $planet
18 18
  * @param array $unit_list
19
- * @param null  $query
20 19
  */
21 20
 function db_change_resources(&$user, &$planet, $unit_list) {
22 21
   $group = sn_get_groups('resources_loot');
@@ -56,6 +55,9 @@  discard block
 block discarded – undo
56 55
 
57 56
 }
58 57
 
58
+/**
59
+ * @param boolean $transaction_should_be_started
60
+ */
59 61
 function sn_db_transaction_check($transaction_should_be_started = null) {
60 62
   return classSupernova::$gc->db->getTransaction()->check($transaction_should_be_started);
61 63
 }
Please login to merge, or discard this patch.
includes/classes/DbQueryConstructor.php 1 patch
Doc Comments   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -155,10 +155,17 @@  discard block
 block discarded – undo
155 155
     return $this->field(DbSqlLiteral::build($this->db)->literal($field));
156 156
   }
157 157
 
158
+  /**
159
+   * @param string $functionName
160
+   * @param string $alias
161
+   */
158 162
   public function fieldSingleFunction($functionName, $field = '*', $alias = DbSqlLiteral::SQL_LITERAL_ALIAS_NONE) {
159 163
     return $this->field(DbSqlLiteral::build($this->db)->buildSingleArgument($functionName, $field, $alias));
160 164
   }
161 165
 
166
+  /**
167
+   * @param string $alias
168
+   */
162 169
   public function fieldCount($field = '*', $alias = DbSqlLiteral::SQL_LITERAL_ALIAS_NONE) {
163 170
     return $this->field(DbSqlLiteral::build($this->db)->count($field, $alias));
164 171
   }
@@ -240,7 +247,7 @@  discard block
 block discarded – undo
240 247
 
241 248
   /**
242 249
    * @param db_mysql|null $db
243
-   * @param string|object|DBStaticRecord|DbSqlAware $className
250
+   * @param string $className
244 251
    *
245 252
    * @return static
246 253
    */
@@ -444,7 +451,6 @@  discard block
 block discarded – undo
444 451
   }
445 452
 
446 453
   /**
447
-   * @param bool $skip_query_check
448 454
    *
449 455
    * @return array
450 456
    */
@@ -455,7 +461,6 @@  discard block
 block discarded – undo
455 461
   }
456 462
 
457 463
   /**
458
-   * @param bool $skip_query_check
459 464
    *
460 465
    * @return mixed|null
461 466
    */
Please login to merge, or discard this patch.
includes/classes/EntityModel.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -63,6 +63,10 @@
 block discarded – undo
63 63
    */
64 64
   protected $accessors = array();
65 65
 
66
+  /**
67
+   * @param string $varName
68
+   * @param string $type
69
+   */
66 70
   protected function assignAccessor($varName, $type, $callable) {
67 71
     if (empty($callable)) {
68 72
       return;
Please login to merge, or discard this patch.
includes/classes/db_mysql.php 1 patch
Doc Comments   +28 added lines, -5 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
   /**
158 158
    * @param string $query
159 159
    *
160
-   * @return mixed|string
160
+   * @return string
161 161
    */
162 162
   public function replaceTablePlaceholders($query) {
163 163
     $sql = $query;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
   }
172 172
 
173 173
   /**
174
-   * @param $query
174
+   * @param string $query
175 175
    */
176 176
   protected function logQuery($query) {
177 177
     if (!classSupernova::$config->debug) {
@@ -286,6 +286,7 @@  discard block
 block discarded – undo
286 286
    * @param array  $fields
287 287
    * @param array  $where
288 288
    * @param bool   $isOneRecord
289
+   * @param boolean $forUpdate
289 290
    *
290 291
    * @return array|bool|mysqli_result|null
291 292
    */
@@ -331,6 +332,11 @@  discard block
 block discarded – undo
331 332
 
332 333
 
333 334
   // INSERT/REPLACE
335
+
336
+  /**
337
+   * @param string $table
338
+   * @param integer $replace
339
+   */
334 340
   protected function doSet($table, $fieldsAndValues, $replace = DB_INSERT_PLAIN) {
335 341
     $query = DbQuery::build($this)
336 342
       ->setTable($table)
@@ -368,6 +374,10 @@  discard block
 block discarded – undo
368 374
 
369 375
 
370 376
   // INSERTERS
377
+
378
+  /**
379
+   * @param string $query
380
+   */
371 381
   public function doInsertComplex($query) {
372 382
     return $this->doSql($query);
373 383
   }
@@ -387,7 +397,7 @@  discard block
 block discarded – undo
387 397
    * Values should be passed as-is
388 398
    *
389 399
    * @param string   $table
390
-   * @param array    $fields
400
+   * @param string[]    $fields
391 401
    * @param string[] $values
392 402
    *
393 403
    * @return array|bool|mysqli_result|null
@@ -440,7 +450,7 @@  discard block
 block discarded – undo
440 450
    * Self-contained - means no params used
441 451
    * Such queries usually used to make large amount of in-base calculations
442 452
    *
443
-   * @param $query
453
+   * @param string $query
444 454
    *
445 455
    * @return array|bool|mysqli_result|null
446 456
    */
@@ -457,13 +467,16 @@  discard block
 block discarded – undo
457 467
   }
458 468
 
459 469
   /**
460
-   * @param $DbQuery DbQuery
470
+   * @param DbQuery $DbQuery DbQuery
461 471
    */
462 472
   public function doUpdateDbQueryAdjust($DbQuery) {
463 473
     return $this->doUpdateDbQuery($DbQuery);
464 474
   }
465 475
 
466 476
 
477
+  /**
478
+   * @param boolean $isOneRecord
479
+   */
467 480
   protected function doUpdateWhere($table, $fieldsSet, $fieldsAdjust = array(), $where = array(), $isOneRecord = DB_RECORDS_ALL, $whereDanger = array()) {
468 481
     $query = DbQuery::build($this)
469 482
       ->setTable($table)
@@ -482,6 +495,9 @@  discard block
 block discarded – undo
482 495
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORD_ONE);
483 496
   }
484 497
 
498
+  /**
499
+   * @param string $table
500
+   */
485 501
   public function doUpdateTableSet($table, $fieldsAndValues, $where = array()) {
486 502
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORDS_ALL);
487 503
   }
@@ -597,6 +613,10 @@  discard block
 block discarded – undo
597 613
   }
598 614
 
599 615
   // TODO Заменить это на новый логгер
616
+
617
+  /**
618
+   * @param string $query
619
+   */
600 620
   protected function security_watch_user_queries($query) {
601 621
     global $user;
602 622
 
@@ -620,6 +640,9 @@  discard block
 block discarded – undo
620 640
   }
621 641
 
622 642
 
643
+  /**
644
+   * @param string $query
645
+   */
623 646
   public function security_query_check_bad_words($query) {
624 647
     if ($this->skipQueryCheck) {
625 648
       return;
Please login to merge, or discard this patch.
includes/classes/DbRowDirectOperator.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -85,6 +85,9 @@
 block discarded – undo
85 85
     return $this->db->doSelectIterator($query);
86 86
   }
87 87
 
88
+  /**
89
+   * @param string $table
90
+   */
88 91
   public function doUpdateRowSetAffected($table, $fieldsAndValues, $where) {
89 92
     $this->db->doUpdateRowSet($table, $fieldsAndValues, $where);
90 93
     return $this->db->db_affected_rows();
Please login to merge, or discard this patch.