Passed
Push — master ( b2d0b0...fb44c0 )
by RN
01:51
created
src/Dolphin/Dolphin.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
             }
300 300
 
301 301
             if(count($this->results) ){
302
-              // now turn this stdClass object to the object type of calling model
303
-              $rows = $util->turnObjects($this->className, $this->results);
302
+                // now turn this stdClass object to the object type of calling model
303
+                $rows = $util->turnObjects($this->className, $this->results);
304 304
             }
305 305
             // Reset class variables
306 306
             $this->reset();
@@ -446,14 +446,14 @@  discard block
 block discarded – undo
446 446
     public function update($row)
447 447
     {
448 448
         $result =  (new UpdateQueryBuilder())->update(
449
-          $row,
450
-          $this->table,
451
-          $this->where,
452
-          $this->whereRaw,
453
-          $this->whereIn,
454
-          $this->whereNotIn,
455
-          $this->whereNull,
456
-          $this->whereNotNull
449
+            $row,
450
+            $this->table,
451
+            $this->where,
452
+            $this->whereRaw,
453
+            $this->whereIn,
454
+            $this->whereNotIn,
455
+            $this->whereNull,
456
+            $this->whereNotNull
457 457
         );
458 458
 
459 459
         $this->reset();
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     protected $offset;
74 74
     protected $results;
75 75
 
76
-    private function getFields(array $args, bool $quote = true){
76
+    private function getFields(array $args, bool $quote = true) {
77 77
         $fldAr = array();
78 78
         $qb = new QueryBuilder();
79 79
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         return $fldAr;
87 87
     }
88 88
 
89
-    private function validateArgsCount($noOfArgs){
90
-        if($noOfArgs<2 || $noOfArgs >3){
89
+    private function validateArgsCount($noOfArgs) {
90
+        if ($noOfArgs < 2 || $noOfArgs > 3) {
91 91
             throw new Exception('Where parameter contains invalid number of parameters', 1);
92 92
         }
93 93
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
         $this->validateArgsCount($noOfArgs);
150 150
 
151
-        if($noOfArgs===2){
151
+        if ($noOfArgs === 2) {
152 152
             $this->where = array_merge($this->where, [[$args[0], '=', $args[1]]]);
153 153
             return $this;
154 154
         }
@@ -294,11 +294,11 @@  discard block
 block discarded – undo
294 294
 
295 295
             if ($fetchRows == 'first') {
296 296
                 $this->results = $stmt->fetch(\PDO::FETCH_OBJ);
297
-            } else{
297
+            } else {
298 298
                 $this->results = $stmt->fetchAll(\PDO::FETCH_ASSOC);
299 299
             }
300 300
 
301
-            if(count($this->results) ){
301
+            if (count($this->results)) {
302 302
               // now turn this stdClass object to the object type of calling model
303 303
               $rows = $util->turnObjects($this->className, $this->results);
304 304
             }
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
         $row = $this->first();
386 386
 
387
-        if($row == null ){
387
+        if ($row == null) {
388 388
             throw new Exception("The record does not exists!");
389 389
         }
390 390
 
@@ -412,9 +412,9 @@  discard block
 block discarded – undo
412 412
         $qb = new QueryBuilder();
413 413
         $query = "TRUNCATE ".$this->table;
414 414
 
415
-        try{
415
+        try {
416 416
             Connection::get()->query($qb->queryPrefix($query));
417
-        } catch(Exception $e){
417
+        } catch (Exception $e) {
418 418
             throw new Exception($e->getMessage());
419 419
         }
420 420
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public function update($row)
447 447
     {
448
-        $result =  (new UpdateQueryBuilder())->update(
448
+        $result = (new UpdateQueryBuilder())->update(
449 449
           $row,
450 450
           $this->table,
451 451
           $this->where,
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
         $wqb = new WhereQueryBuilder();
475 475
         $query = "DELETE FROM ".$this->table;
476 476
 
477
-        try{
477
+        try {
478 478
             $whereQuery = $wqb->buildAllWhereQuery(
479 479
                                     $this->where,
480 480
                                     $this->whereRaw,
@@ -483,10 +483,10 @@  discard block
 block discarded – undo
483 483
                                     $this->whereNull,
484 484
                                     $this->whereNotNull
485 485
                                 );
486
-            $query.= " ".join(" ", $whereQuery);
486
+            $query .= " ".join(" ", $whereQuery);
487 487
             Connection::get()->query($qb->queryPrefix($query));
488 488
             $this->reset();
489
-        } catch(Exception $e){
489
+        } catch (Exception $e) {
490 490
             throw new Exception($e->getMessage());
491 491
         }
492 492
 
Please login to merge, or discard this patch.