Completed
Push — work-fleets ( 6257a1...22b5bc )
by SuperNova.WS
06:47
created
includes/classes/db_mysql.php 1 patch
Doc Comments   +29 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,11 @@  discard block
 block discarded – undo
301 301
 
302 302
 
303 303
   // INSERT/REPLACE
304
+
305
+  /**
306
+   * @param string $table
307
+   * @param integer $replace
308
+   */
304 309
   protected function doSet($table, $fieldsAndValues, $replace = DB_INSERT_PLAIN) {
305 310
     $query = DbQuery::build($this)
306 311
       ->setTable($table)
@@ -338,6 +343,10 @@  discard block
 block discarded – undo
338 343
 
339 344
 
340 345
   // INSERTERS
346
+
347
+  /**
348
+   * @param string $query
349
+   */
341 350
   public function doInsertComplex($query) {
342 351
     return $this->doSql($query);
343 352
   }
@@ -358,7 +367,7 @@  discard block
 block discarded – undo
358 367
    * Values should be passed as-is
359 368
    *
360 369
    * @param string   $table
361
-   * @param array    $fields
370
+   * @param string[]    $fields
362 371
    * @param string[] $values
363 372
    *
364 373
    * @return array|bool|mysqli_result|null
@@ -415,7 +424,7 @@  discard block
 block discarded – undo
415 424
    * Self-contained - means no params used
416 425
    * Such queries usually used to make large amount of in-base calculations
417 426
    *
418
-   * @param $query
427
+   * @param string $query
419 428
    *
420 429
    * @return array|bool|mysqli_result|null
421 430
    */
@@ -423,6 +432,9 @@  discard block
 block discarded – undo
423 432
     return $this->doSql($query);
424 433
   }
425 434
 
435
+  /**
436
+   * @param boolean $isOneRecord
437
+   */
426 438
   protected function doUpdateWhere($table, $fieldsSet, $fieldsAdjust = array(), $where = array(), $isOneRecord = DB_RECORDS_ALL) {
427 439
 //    $query = DbQuery::build($this)
428 440
 //      ->setTable($table)
@@ -457,10 +469,16 @@  discard block
 block discarded – undo
457 469
     return $this->doSql($query);
458 470
   }
459 471
 
472
+  /**
473
+   * @param string $table
474
+   */
460 475
   public function doUpdateRowSet($table, $fieldsAndValues, $where) {
461 476
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORD_ONE);
462 477
   }
463 478
 
479
+  /**
480
+   * @param string $table
481
+   */
464 482
   public function doUpdateTableSet($table, $fieldsAndValues, $where = array()) {
465 483
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORDS_ALL);
466 484
   }
@@ -680,6 +698,10 @@  discard block
 block discarded – undo
680 698
   }
681 699
 
682 700
   // TODO Заменить это на новый логгер
701
+
702
+  /**
703
+   * @param string $query
704
+   */
683 705
   protected function security_watch_user_queries($query) {
684 706
     global $user;
685 707
 
@@ -703,6 +725,9 @@  discard block
 block discarded – undo
703 725
   }
704 726
 
705 727
 
728
+  /**
729
+   * @param string $query
730
+   */
706 731
   public function security_query_check_bad_words($query) {
707 732
     if ($this->skipQueryCheck) {
708 733
       return;
Please login to merge, or discard this patch.