Passed
Push — main ( b51950...376464 )
by BRUNO
02:00
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
@@ -49,8 +49,9 @@  discard block
 block discarded – undo
49 49
     {
50 50
         try {
51 51
             $query = "SELECT {$fields} FROM {$this->getTable()}";
52
-            if (!empty($this->getTableAlias()))
53
-                $query .= " AS {$this->getTableAlias()}";
52
+            if (!empty($this->getTableAlias())) {
53
+                            $query .= " AS {$this->getTableAlias()}";
54
+            }
54 55
             $this->add($query, "main", $paramns);
55 56
             return $this;
56 57
         } catch (\PDOException $e) {
@@ -404,8 +405,9 @@  discard block
 block discarded – undo
404 405
                 $this->sqlPartsSelect[$type] = $query;
405 406
             }
406 407
 
407
-            if (!empty($params))
408
-                $this->setParameter($params);
408
+            if (!empty($params)) {
409
+                            $this->setParameter($params);
410
+            }
409 411
         } catch (\PDOException $e) {
410 412
             $this->setError($e);
411 413
         }
Please login to merge, or discard this patch.