Completed
Push — master ( 69d137...9b4748 )
by Dmytro
04:18 queued 01:44
created
framework/db/DBObject.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -414,11 +414,11 @@  discard block
 block discarded – undo
414 414
          */
415 415
         if ($this->isNewRecord()) {
416 416
             if (!empty($this->dbQuery->conditions)) {
417
-                $this->dbQuery->query.= " WHERE ";
417
+                $this->dbQuery->query .= " WHERE ";
418 418
                 $this->dbQuery->sqlPushValues($this->dbQuery->conditions, " AND ");
419 419
             }
420 420
         } else {
421
-            $this->dbQuery->query.= " WHERE ";
421
+            $this->dbQuery->query .= " WHERE ";
422 422
             $this->dbQuery->sqlPushValues([static::ID_FIELD_NAME => $this->id]);
423 423
         }
424 424
 
@@ -427,14 +427,14 @@  discard block
 block discarded – undo
427 427
          */
428 428
         if ($this->isNewRecord()) {
429 429
             if (!empty($this->dbQuery->order)) {
430
-                $this->dbQuery->query.= " ORDER BY";
430
+                $this->dbQuery->query .= " ORDER BY";
431 431
                 if (is_array($this->dbQuery->order)) {
432 432
                     foreach ($this->dbQuery->order as $fieldName => $ord) {
433
-                        $this->dbQuery->query.= " " . $fieldName . " " . $ord . ",";
433
+                        $this->dbQuery->query .= " " . $fieldName . " " . $ord . ",";
434 434
                     }
435 435
                     $this->dbQuery->query = substr($this->dbQuery->query, 0, strlen($this->dbQuery->query) - 1);
436 436
                 } elseif (is_string($this->dbQuery->order)) {
437
-                    $this->dbQuery->query.= " " . $this->dbQuery->order;
437
+                    $this->dbQuery->query .= " " . $this->dbQuery->order;
438 438
                 }
439 439
             }
440 440
         }
@@ -446,13 +446,13 @@  discard block
 block discarded – undo
446 446
         if ($this->isNewRecord()) {
447 447
             if (!is_null($this->dbQuery->limit)) {
448 448
                 if (Tools::isInteger($this->dbQuery->limit)) {
449
-                    $this->dbQuery->query.= " LIMIT " . $this->dbQuery->limit;
449
+                    $this->dbQuery->query .= " LIMIT " . $this->dbQuery->limit;
450 450
                     $count = $this->dbQuery->limit;
451 451
                 } elseif (is_array($this->dbQuery->limit) && count($this->dbQuery->limit) == 2) {
452 452
                     $offset = $this->dbQuery->limit[0];
453 453
                     $count = $this->dbQuery->limit[1];
454 454
                     if (Tools::isInteger($offset) && Tools::isInteger($count)) {
455
-                        $this->dbQuery->query.= " LIMIT " . $offset . ", " . $count;
455
+                        $this->dbQuery->query .= " LIMIT " . $offset . ", " . $count;
456 456
                     } else {
457 457
                         throw new DBCoreException("Invalid LIMIT param in select() method.");
458 458
                     }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
                 }
462 462
             }
463 463
         } else {
464
-            $this->dbQuery->query.= " LIMIT 1";
464
+            $this->dbQuery->query .= " LIMIT 1";
465 465
             $count = 1;
466 466
         }
467 467
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
     /**
59 59
      * Sets primary key value.
60 60
      *
61
-     * @param mixed $recordId Key vaue.
61
+     * @param integer $recordId Key vaue.
62 62
      *
63 63
      * @throws DBCoreException If object has no field with such name.
64 64
      *
65
-     * @return bool Success flag.
65
+     * @return DBObject Success flag.
66 66
      */
67 67
     public function setId($recordId)
68 68
     {
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     /**
533 533
      * Deletes DB record for current DBObject.
534 534
      *
535
-     * @return mixed Number of affected rows (1 if some record was deleted,
535
+     * @return integer Number of affected rows (1 if some record was deleted,
536 536
      *               0 - if no) or FALSE if some error occurred.
537 537
      */
538 538
     public function delete()
Please login to merge, or discard this patch.
framework/db/DBCore.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -481,11 +481,11 @@  discard block
 block discarded – undo
481 481
 
482 482
         $fieldStr = "'" . $field . "' => ";
483 483
         if ($attributes['null'] === 'YES' && is_null($attributes['default'])) {
484
-            $fieldStr.= "null";
484
+            $fieldStr .= "null";
485 485
         } else {
486
-            $fieldStr.= self::getPrintableSQLValue($attributes['type'], $attributes['default']);
486
+            $fieldStr .= self::getPrintableSQLValue($attributes['type'], $attributes['default']);
487 487
         }
488
-        $fieldStr.= ", // " . $attributes['type'] .
488
+        $fieldStr .= ", // " . $attributes['type'] .
489 489
             ", " . (($attributes['null'] == "NO") ? "not null" : "null")
490 490
             . ", default '" . $attributes['default'] . "'" .
491 491
             ($extra ? ", " . $extra : "") .
@@ -583,9 +583,9 @@  discard block
 block discarded – undo
583 583
                   LIMIT 1";
584 584
         $typesString = DBPreparedQuery::sqlTypesString($fieldsList, $idFieldName);
585 585
         if (Tools::isInteger($fieldsList[$idFieldName])) {
586
-            $typesString.= "i";
586
+            $typesString .= "i";
587 587
         } else {
588
-            $typesString.= "s";
588
+            $typesString .= "s";
589 589
         }
590 590
         $valuesList = self::createValuesList($fieldsList, $idFieldName);
591 591
         $valuesList[] = $dbObject->getId();
Please login to merge, or discard this patch.