Passed
Push — master ( 213898...b5fe83 )
by RN
01:47
created
src/Dolphin/Dolphin.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,12 +73,12 @@  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
         return (new QueryBuilder())->getFields($args, $quote);
78 78
     }
79 79
 
80
-    private function validateArgsCount($noOfArgs){
81
-        if($noOfArgs<2 || $noOfArgs >3){
80
+    private function validateArgsCount($noOfArgs) {
81
+        if ($noOfArgs < 2 || $noOfArgs > 3) {
82 82
             throw new Exception('Where parameter contains invalid number of parameters', 1);
83 83
         }
84 84
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $noOfArgs = func_num_args();
139 139
         $this->validateArgsCount($noOfArgs);
140 140
 
141
-        if($noOfArgs===2){
141
+        if ($noOfArgs === 2) {
142 142
             $this->where = array_merge($this->where, [[$args[0], '=', $args[1]]]);
143 143
             return $this;
144 144
         }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     protected function buildQuery()
225 225
     {
226
-        $query  = (new QueryBuilder())->buildQuery([
226
+        $query = (new QueryBuilder())->buildQuery([
227 227
             'table' => $this->table,
228 228
             'fields' => $this->fields,
229 229
             'join' => $this->join,
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         $this->where('id', $id);
335 335
         $row = $this->first();
336 336
 
337
-        if($row == null ){
337
+        if ($row == null) {
338 338
             throw new Exception("The record does not exists!");
339 339
         }
340 340
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      */
374 374
     public function update($row)
375 375
     {
376
-        $result =  (new UpdateQueryBuilder())->update(
376
+        $result = (new UpdateQueryBuilder())->update(
377 377
           $row,
378 378
           $this->table,
379 379
           $this->where,
@@ -401,9 +401,9 @@  discard block
 block discarded – undo
401 401
         $qb = new QueryBuilder();
402 402
         $query = "TRUNCATE ".$this->table;
403 403
 
404
-        try{
404
+        try {
405 405
             Connection::get()->query($qb->queryPrefix($query));
406
-        } catch(Exception $e){
406
+        } catch (Exception $e) {
407 407
             throw new Exception($e->getMessage());
408 408
         }
409 409
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
      */
420 420
     public function delete()
421 421
     {
422
-        $result =  (new DeleteQueryBuilder())->delete(
422
+        $result = (new DeleteQueryBuilder())->delete(
423 423
           $this->table,
424 424
           $this->where,
425 425
           $this->whereRaw,
Please login to merge, or discard this patch.
src/Dolphin/Parsers/WhereQueryParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 class WhereQueryParser
14 14
 {
15 15
 
16
-    protected function prepareArrayForWhere($bindKey, $bindVal = null, $mainAr = []){
16
+    protected function prepareArrayForWhere($bindKey, $bindVal = null, $mainAr = []) {
17 17
         $ar = $conditionAr = [];
18 18
         // expecting a string like 'status = :status'
19 19
         if ($this->checkWherePrepareUsed($bindKey)) {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function parseWhereQuery($whereQuery = [])
36 36
     {
37 37
         $ar = [];
38
-        if(!count($whereQuery)){
38
+        if (!count($whereQuery)) {
39 39
           return $ar;
40 40
         }
41 41
 
Please login to merge, or discard this patch.