Passed
Push — main ( 5eac8c...ece782 )
by BRUNO
02:03
created
src/Crud.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@
 block discarded – undo
33 33
 
34 34
         $sql = "SELECT {$fields} FROM {$this->getTable()}";
35 35
 
36
-        if (!empty($this->getTableAlias()))
37
-            $sql .= " AS {$this->getTableAlias()}";
36
+        if (!empty($this->getTableAlias())) {
37
+                    $sql .= " AS {$this->getTableAlias()}";
38
+        }
38 39
 
39 40
         $sql .= "{$add}";
40 41
 
Please login to merge, or discard this patch.
src/DatalayerTrait.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,8 +132,9 @@
 block discarded – undo
132 132
      */
133 133
     protected function setTable(string $tableName, string $tableAlias = ""): self
134 134
     {
135
-        if (!empty($tableAlias))
136
-            $this->tableAlias = $tableAlias;
135
+        if (!empty($tableAlias)) {
136
+                    $this->tableAlias = $tableAlias;
137
+        }
137 138
         $this->tableName = $tableName;
138 139
         return $this;
139 140
     }
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
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
     {
48 48
         try {
49 49
             $query = "SELECT {$fields} FROM {$this->getTable()}";
50
-            if (!empty($this->getTableAlias()))
51
-                $query .= "AS {$this->getTableAlias()} ";
50
+            if (!empty($this->getTableAlias())) {
51
+                            $query .= "AS {$this->getTableAlias()} ";
52
+            }
52 53
             $this->add($query, "main", $paramns);
53 54
             return $this;
54 55
         } catch (\PDOException $e) {
@@ -408,8 +409,9 @@  discard block
 block discarded – undo
408 409
                 $this->sqlPartsSelect[$type] = $text;
409 410
             }
410 411
 
411
-            if (!empty($params))
412
-                $this->params = array_merge($this->params, $params);
412
+            if (!empty($params)) {
413
+                            $this->params = array_merge($this->params, $params);
414
+            }
413 415
         } catch (\PDOException $e) {
414 416
             $this->setError($e);
415 417
         }
Please login to merge, or discard this patch.