Passed
Push — main ( dd9fcf...7064c3 )
by BRUNO
02:37
created
src/Crud.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@
 block discarded – undo
37 37
 
38 38
             $sql = "SELECT {$fields} FROM {$this->getTableName()}";
39 39
 
40
-            if (!empty($this->getTableAlias()))
41
-                $sql .= " AS {$this->getTableAlias()}";
40
+            if (!empty($this->getTableAlias())) {
41
+                            $sql .= " AS {$this->getTableAlias()}";
42
+            }
42 43
 
43 44
             $sql .= $add;
44 45
 
Please login to merge, or discard this patch.
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: {$e->getMessage()}",
Please login to merge, or discard this patch.