Completed
Push — work-fleets ( c62b27...6257a1 )
by SuperNova.WS
06:02
created
includes/classes/db_mysql.php 1 patch
Doc Comments   +28 added lines, -4 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) {
@@ -301,6 +301,10 @@  discard block
 block discarded – undo
301 301
   }
302 302
 
303 303
 
304
+  /**
305
+   * @param string $table
306
+   * @param integer $replace
307
+   */
304 308
   protected function doSet($table, $fieldsAndValues, $replace = DB_INSERT_PLAIN) {
305 309
     $tableSafe = $this->db_escape($table);
306 310
     $safeFieldsAndValues = implode(',', $this->safeFieldsEqualValues($fieldsAndValues));
@@ -349,6 +353,10 @@  discard block
 block discarded – undo
349 353
 
350 354
 
351 355
   // INSERTERS
356
+
357
+  /**
358
+   * @param string $query
359
+   */
352 360
   public function doInsertComplex($query) {
353 361
     return $this->doSql($query);
354 362
   }
@@ -369,7 +377,7 @@  discard block
 block discarded – undo
369 377
    * Values should be passed as-is
370 378
    *
371 379
    * @param string   $table
372
-   * @param array    $fields
380
+   * @param string[]    $fields
373 381
    * @param string[] $values
374 382
    *
375 383
    * @return array|bool|mysqli_result|null
@@ -426,7 +434,7 @@  discard block
 block discarded – undo
426 434
    * Self-contained - means no params used
427 435
    * Such queries usually used to make large amount of in-base calculations
428 436
    *
429
-   * @param $query
437
+   * @param string $query
430 438
    *
431 439
    * @return array|bool|mysqli_result|null
432 440
    */
@@ -434,6 +442,9 @@  discard block
 block discarded – undo
434 442
     return $this->doSql($query);
435 443
   }
436 444
 
445
+  /**
446
+   * @param boolean $isOneRecord
447
+   */
437 448
   protected function doUpdateWhere($table, $fieldsSet, $fieldsAdjust = array(), $where = array(), $isOneRecord = DB_RECORDS_ALL) {
438 449
     $tableSafe = $this->db_escape($table);
439 450
 
@@ -457,10 +468,16 @@  discard block
 block discarded – undo
457 468
     return $this->doSql($query);
458 469
   }
459 470
 
471
+  /**
472
+   * @param string $table
473
+   */
460 474
   public function doUpdateRowSet($table, $fieldsAndValues, $where) {
461 475
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORD_ONE);
462 476
   }
463 477
 
478
+  /**
479
+   * @param string $table
480
+   */
464 481
   public function doUpdateTableSet($table, $fieldsAndValues, $where = array()) {
465 482
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORDS_ALL);
466 483
   }
@@ -727,6 +744,10 @@  discard block
 block discarded – undo
727 744
   }
728 745
 
729 746
   // TODO Заменить это на новый логгер
747
+
748
+  /**
749
+   * @param string $query
750
+   */
730 751
   protected function security_watch_user_queries($query) {
731 752
     global $user;
732 753
 
@@ -750,6 +771,9 @@  discard block
 block discarded – undo
750 771
   }
751 772
 
752 773
 
774
+  /**
775
+   * @param string $query
776
+   */
753 777
   public function security_query_check_bad_words($query) {
754 778
     if ($this->skipQueryCheck) {
755 779
       return;
Please login to merge, or discard this patch.