Passed
Push — main ( 914853...3912a5 )
by BRUNO
01:57
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
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
     {
26 26
         try {
27 27
             $query = "SELECT {$fields} FROM {$this->getTable()} ";
28
-            if (!empty($this->getTableAlias()))
29
-                $query .= "AS {$this->getTableAlias()} ";
28
+            if (!empty($this->getTableAlias())) {
29
+                            $query .= "AS {$this->getTableAlias()} ";
30
+            }
30 31
             $this->add($query, $paramns);
31 32
             return $this;
32 33
         } catch (\PDOException $e) {
@@ -332,8 +333,9 @@  discard block
 block discarded – undo
332 333
     private function add(string $text, array $params = [])
333 334
     {
334 335
         try {
335
-            if (!empty($params))
336
-                $this->params = array_merge($this->params, $params);
336
+            if (!empty($params)) {
337
+                            $this->params = array_merge($this->params, $params);
338
+            }
337 339
             $this->query .= $text;
338 340
         } catch (\PDOException $e) {
339 341
             $this->setError($e);
Please login to merge, or discard this patch.