Passed
Push — main ( 488351...ff7bb8 )
by BRUNO
10:46 queued 08:05
created
src/DatalayerTrait.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,8 +161,9 @@
 block discarded – undo
161 161
      */
162 162
     protected function setTableName(string $tableName, string $tableAlias = ""): self
163 163
     {
164
-        if (!empty($tableAlias))
165
-            $this->tableAlias = $tableAlias;
164
+        if (!empty($tableAlias)) {
165
+                    $this->tableAlias = $tableAlias;
166
+        }
166 167
         $this->tableName = $tableName;
167 168
         return $this;
168 169
     }
Please login to merge, or discard this patch.
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->getTableName()}";
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/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->getTableName()}";
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) {
@@ -402,8 +403,9 @@  discard block
 block discarded – undo
402 403
                 $this->sqlPartsSelect[$type] = $query;
403 404
             }
404 405
 
405
-            if (!empty($params))
406
-                $this->setParams($params);
406
+            if (!empty($params)) {
407
+                            $this->setParams($params);
408
+            }
407 409
         } catch (\PDOException $e) {
408 410
             $this->setError($e);
409 411
         }
Please login to merge, or discard this patch.
src/ModelAbstract.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,8 +106,9 @@
 block discarded – undo
106 106
         if (is_array($data) || is_object($data)) {
107 107
             $result = [];
108 108
             foreach ($data as $key => $value) {
109
-                if(strlen($value) > 0)
110
-                    $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value;
109
+                if(strlen($value) > 0) {
110
+                                    $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value;
111
+                }
111 112
             }
112 113
 
113 114
             return $result;
Please login to merge, or discard this patch.