Passed
Push — main ( 914853...3912a5 )
by BRUNO
01:57
created
src/CrudBuilder.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
     use DatalayerTrait;
18 18
 
19 19
     /**
20
-    * @param string $fields
21
-    * @param array $paramns
22
-    * @return $this
20
+     * @param string $fields
21
+     * @param array $paramns
22
+     * @return $this
23 23
      */
24 24
     public function select(string $fields = "*", array $paramns = []): CrudBuilder
25 25
     {
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
     /**
38
-    * @param string $fields
39
-    * @param array $paramns
40
-    * @return $this
38
+     * @param string $fields
39
+     * @param array $paramns
40
+     * @return $this
41 41
      */
42 42
     public function insert(string $fields, array $paramns): self
43 43
     {
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
     }
57 57
 
58 58
     /**
59
-    * @param string $fields
60
-    * @param array $paramns
61
-    * @return $this
59
+     * @param string $fields
60
+     * @param array $paramns
61
+     * @return $this
62 62
      */
63 63
     public function update(string $fields, array $paramns): self
64 64
     {
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
     }
80 80
 
81 81
     /**
82
-    * @param string $fields
83
-    * @param array $paramns
84
-    * @return $this
82
+     * @param string $fields
83
+     * @param array $paramns
84
+     * @return $this
85 85
      */
86 86
     public function delete(string $fields, array $paramns): self
87 87
     {
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
     }
96 96
 
97 97
     /**
98
-    * @param string $texto
99
-    * @param array $paramns
100
-    * @return $this
98
+     * @param string $texto
99
+     * @param array $paramns
100
+     * @return $this
101 101
      */
102 102
     public function query(string $texto, array $paramns = []): self
103 103
     {
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
     }
111 111
 
112 112
     /**
113
-    * @param string $texto
114
-    * @param array $paramns
115
-    * @return $this
113
+     * @param string $texto
114
+     * @param array $paramns
115
+     * @return $this
116 116
      */
117 117
     public function where(string $texto, array $paramns = []): self
118 118
     {
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
     }
127 127
 
128 128
     /**
129
-    * @param string $condition
130
-    * @param array $paramns
131
-    * @return $this
129
+     * @param string $condition
130
+     * @param array $paramns
131
+     * @return $this
132 132
      */
133 133
     public function andWhere(string $condition, array $paramns = []): self
134 134
     {
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
     }
143 143
 
144 144
     /**
145
-    * @param string $texto
146
-    * @param array $paramns
147
-    * @return $this
145
+     * @param string $texto
146
+     * @param array $paramns
147
+     * @return $this
148 148
      */
149 149
     public function orWhere(string $texto, array $paramns = []): self
150 150
     {
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
     }
159 159
 
160 160
     /**
161
-    * @param string $texto
162
-    * @return $this
161
+     * @param string $texto
162
+     * @return $this
163 163
      */
164 164
     public function orderBy(string $texto): self
165 165
     {
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
     }
174 174
 
175 175
     /**
176
-    * @param string $texto
177
-    * @return $this
176
+     * @param string $texto
177
+     * @return $this
178 178
      */
179 179
     public function limit(string $texto): self
180 180
     {
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
     }
185 185
 
186 186
     /**
187
-    * @param string $texto
188
-    * @return $this
187
+     * @param string $texto
188
+     * @return $this
189 189
      */
190 190
     public function offset(string $texto): self
191 191
     {
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
     }
200 200
 
201 201
     /**
202
-    * @param string $texto
203
-    * @return $this
202
+     * @param string $texto
203
+     * @return $this
204 204
      */
205 205
     public function groupBy(string $texto): self
206 206
     {
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
     }
215 215
 
216 216
     /**
217
-    * @param string $texto
218
-    * @return $this
217
+     * @param string $texto
218
+     * @return $this
219 219
      */
220 220
     public function having(string $texto): self
221 221
     {
@@ -229,10 +229,10 @@  discard block
 block discarded – undo
229 229
     }
230 230
 
231 231
     /**
232
-    * @param string $table
233
-    * @param string $alias
234
-    * @param string $codition
235
-    * @return $this
232
+     * @param string $table
233
+     * @param string $alias
234
+     * @param string $codition
235
+     * @return $this
236 236
      */
237 237
     public function innerJoin(string $table, string $alias, string $codition): self
238 238
     {
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
     }
247 247
 
248 248
     /**
249
-    * @param string $table
250
-    * @param string $alias
251
-    * @param string $codition
252
-    * @return $this
249
+     * @param string $table
250
+     * @param string $alias
251
+     * @param string $codition
252
+     * @return $this
253 253
      */
254 254
     public function leftJoin(string $table, string $alias, string $codition): self
255 255
     {
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
     }
264 264
 
265 265
     /**
266
-    * @param string $table
267
-    * @param string $alias
268
-    * @param string $codition
269
-    * @return $this
266
+     * @param string $table
267
+     * @param string $alias
268
+     * @param string $codition
269
+     * @return $this
270 270
      */
271 271
     public function rightJoin(string $table, string $alias, string $codition): self
272 272
     {
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     }
294 294
 
295 295
     /**
296
-    * @return void
296
+     * @return void
297 297
      */
298 298
     public function debug()
299 299
     {
Please login to merge, or discard this 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.