Passed
Push — main ( 757c8d...46dc6a )
by BRUNO
01:56
created
src/ModelAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
         }
88 88
 
89 89
         return $classname . ' {' . implode(', ', array_map(
90
-            function ($p_0) use ($data) {
90
+            function($p_0) use ($data) {
91 91
                 $p_0->setAccessible(true);
92 92
 
93 93
                 return $p_0->getName() . ': ' . $p_0->getValue($data);
Please login to merge, or discard this patch.
src/DatalayerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
             $prepare = empty($prepare) ? $this->prepare : $prepare;
165 165
             return $prepare->rowCount();
166 166
         } catch (PDOException $e) {
167
-            $this->setError($e);}
167
+            $this->setError($e); }
168 168
     }
169 169
 
170 170
     /**
Please login to merge, or discard this patch.
src/Crud.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function select(string $fields = '*', string $add = '', array $values = null, bool $returnModel = false, bool $debug = false)
29 29
     {
30
-        if (strlen($add) > 0) {
30
+        if (strlen($add)>0) {
31 31
             $add = ' ' . $add;
32 32
         }
33 33
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $numparams = substr($numparams, 1);
67 67
         $sql = "INSERT INTO {$this->getTable()} ({$fields}) VALUES ({$numparams})";
68 68
         if ($debug) {
69
-            echo $sql.'<pre>'.print_r($values).'</pre>';
69
+            echo $sql . '<pre>' . print_r($values) . '</pre>';
70 70
             return;
71 71
         }
72 72
         $result = $this->executeSQL($sql, $values);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $sql .= " WHERE $where";
149 149
         }
150 150
         if ($debug) {
151
-            echo $sql.'<pre>'.print_r($values).'</pre>';
151
+            echo $sql . '<pre>' . print_r($values) . '</pre>';
152 152
             return;
153 153
         }
154 154
         $result = $this->executeSQL($sql, $values);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             $sql .= " WHERE $where";
224 224
         }
225 225
         if ($debug) {
226
-            echo $sql.'<pre>'.print_r($values).'</pre>';
226
+            echo $sql . '<pre>' . print_r($values) . '</pre>';
227 227
             return;
228 228
         }
229 229
         $result = $this->executeSQL($sql, $values);
Please login to merge, or discard this patch.
src/CrudBuilder.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     private function orderBy(string $parameter, $order = null): self
188 188
     {
189 189
         try {
190
-            $query = "ORDER BY {$parameter} ".($order ?? 'ASC');
190
+            $query = "ORDER BY {$parameter} " . ($order ?? 'ASC');
191 191
             $this->add($query, "orderBy");
192 192
             return $this;
193 193
         } catch (\PDOException $e) {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     private function addOrderBy(string $parameter, $order = null): self
199 199
     {
200 200
         try {
201
-            $query = ", {$parameter} ".($order ?? 'ASC')." ";
201
+            $query = ", {$parameter} " . ($order ?? 'ASC') . " ";
202 202
             $this->add($query, "addOrderBy");
203 203
             return $this;
204 204
         } catch (\PDOException $e) {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     private function limit(string $texto): self
214 214
     {
215 215
         $query = "LIMIT {$texto}";
216
-        $this->add($query,"limit");
216
+        $this->add($query, "limit");
217 217
         return $this;
218 218
     }
219 219
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     {
226 226
         try {
227 227
             $query = "OFFSET {$texto}";
228
-            $this->add($query,"offset");
228
+            $this->add($query, "offset");
229 229
             return $this;
230 230
         } catch (\PDOException $e) {
231 231
             $this->setError($e);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     {
241 241
         try {
242 242
             $query = "GROUP BY {$texto}";
243
-            $this->add($query,"groupBy");
243
+            $this->add($query, "groupBy");
244 244
             return $this;
245 245
         } catch (\PDOException $e) {
246 246
             $this->setError($e);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     {
256 256
         try {
257 257
             $query = "HAVING {$texto}";
258
-            $this->add($query,"having");
258
+            $this->add($query, "having");
259 259
             return $this;
260 260
         } catch (\PDOException $e) {
261 261
             $this->setError($e);
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     {
271 271
         try {
272 272
             $query = "AND {$texto}";
273
-            $this->add($query,"andHaving");
273
+            $this->add($query, "andHaving");
274 274
             return $this;
275 275
         } catch (\PDOException $e) {
276 276
             $this->setError($e);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     {
286 286
         try {
287 287
             $query = "OR {$codition}";
288
-            $this->add($query,"orHaving");
288
+            $this->add($query, "orHaving");
289 289
             return $this;
290 290
         } catch (\PDOException $e) {
291 291
             $this->setError($e);
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     {
303 303
         try {
304 304
             $query = "INNER JOIN {$table} AS {$alias} ON $codition";
305
-            $this->add($query,"join");
305
+            $this->add($query, "join");
306 306
             return $this;
307 307
         } catch (\PDOException $e) {
308 308
             $this->setError($e);
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     {
320 320
         try {
321 321
             $query = "LEFT JOIN {$table} AS {$alias} ON {$codition}";
322
-            $this->add($query,"join");
322
+            $this->add($query, "join");
323 323
             return $this;
324 324
         } catch (\PDOException $e) {
325 325
             $this->setError($e);
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
     {
337 337
         try {
338 338
             $query = "RIGHT JOIN {$table} AS {$alias} ON $codition";
339
-            $this->add($query,"join");
339
+            $this->add($query, "join");
340 340
             return $this;
341 341
         } catch (\PDOException $e) {
342 342
             $this->setError($e);
@@ -349,9 +349,9 @@  discard block
 block discarded – undo
349 349
     private function executeQuery(): self
350 350
     {
351 351
         try {
352
-            foreach ($this->sqlPartsSelect as $key => $part){
352
+            foreach ($this->sqlPartsSelect as $key => $part) {
353 353
                 if (is_array($part)) {
354
-                    foreach ($part as $item){
354
+                    foreach ($part as $item) {
355 355
                         $this->query .= $item;
356 356
                     }
357 357
                 } else {
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
     private function add(string $text, string $type, array $params = [])
414 414
     {
415
-        $text = $text." ";
415
+        $text = $text . " ";
416 416
         try {
417 417
             if (is_array($this->sqlPartsSelect[$type])) {
418 418
                 $this->sqlPartsSelect[$type][] = $text;
Please login to merge, or discard this patch.