Passed
Push — main ( 7c0f98...efcfe1 )
by BRUNO
01:59
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) {
@@ -429,8 +430,9 @@  discard block
 block discarded – undo
429 430
                 $this->sqlPartsSelect[$type] = $query;
430 431
             }
431 432
 
432
-            if (!empty($params))
433
-                $this->params = array_merge($this->params, $params);
433
+            if (!empty($params)) {
434
+                            $this->params = array_merge($this->params, $params);
435
+            }
434 436
         } catch (\PDOException $e) {
435 437
             $this->setError($e);
436 438
         }
Please login to merge, or discard this patch.