Passed
Push — main ( d5a765...5aef95 )
by BRUNO
02:41
created
src/CrudBuilder.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,8 +48,9 @@  discard block
 block discarded – undo
48 48
     {
49 49
         try {
50 50
             $query = "SELECT {$fields} FROM {$this->getTableName()}";
51
-            if (!empty($this->getTableAlias()))
52
-                $query .= " AS {$this->getTableAlias()}";
51
+            if (!empty($this->getTableAlias())) {
52
+                            $query .= " AS {$this->getTableAlias()}";
53
+            }
53 54
             $this->add($query, "main", $paramns);
54 55
             return $this;
55 56
         } catch (\PDOException $e) {
@@ -504,8 +505,9 @@  discard block
 block discarded – undo
504 505
                 $this->sqlPartsSelect[$type] = $query;
505 506
             }
506 507
 
507
-            if (!empty($params))
508
-                $this->setParams($params);
508
+            if (!empty($params)) {
509
+                            $this->setParams($params);
510
+            }
509 511
         } catch (\PDOException $e) {
510 512
             throw new DatabaseException(
511 513
                 "Add query part failed - TABLE: [{$this->getTableName()}] MESSAGE: [{$e->getMessage()}]",
Please login to merge, or discard this patch.