Passed
Push — master ( 185543...6b0532 )
by Malte
02:33
created
src/IMAP/Query/WhereQuery.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
             foreach($criteria as $arguments){
60 60
                 if(count($arguments) == 1){
61 61
                     $this->where($arguments[0]);
62
-                }elseif(count($arguments) == 2){
62
+                } elseif(count($arguments) == 2){
63 63
                     $this->where($arguments[0], $arguments[1]);
64 64
                 }
65 65
             }
66
-        }else{
66
+        } else{
67 67
             $criteria = $this->validate_criteria($criteria);
68 68
             $value = $this->parse_value($value);
69 69
 
70 70
             if($value === null || $value === ''){
71 71
                 $this->query->push([$criteria]);
72
-            }else{
72
+            } else{
73 73
                 $this->query->push([$criteria, $value]);
74 74
             }
75 75
         }
@@ -84,7 +84,9 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function orWhere(\Closure $closure = null){
86 86
         $this->query->push(['OR']);
87
-        if($closure !== null) $closure($this);
87
+        if($closure !== null) {
88
+            $closure($this);
89
+        }
88 90
 
89 91
         return $this;
90 92
     }
@@ -96,7 +98,9 @@  discard block
 block discarded – undo
96 98
      */
97 99
     public function andWhere(\Closure $closure = null) {
98 100
         $this->query->push(['AND']);
99
-        if($closure !== null) $closure($this);
101
+        if($closure !== null) {
102
+            $closure($this);
103
+        }
100 104
 
101 105
         return $this;
102 106
     }
Please login to merge, or discard this patch.
src/IMAP/Query/Query.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,9 @@  discard block
 block discarded – undo
97 97
      * @throws MessageSearchValidationException
98 98
      */
99 99
     protected function parse_date($date){
100
-        if($date instanceof \Carbon\Carbon) return $date;
100
+        if($date instanceof \Carbon\Carbon) {
101
+            return $date;
102
+        }
101 103
 
102 104
         try {
103 105
             $date = Carbon::parse($date);
@@ -169,7 +171,7 @@  discard block
 block discarded – undo
169 171
             } else {
170 172
                 if($statement[1] === null){
171 173
                     $query .= $statement[0];
172
-                }else{
174
+                } else{
173 175
                     $query .= $statement[0].' "'.$statement[1].'"';
174 176
                 }
175 177
             }
@@ -198,7 +200,9 @@  discard block
 block discarded – undo
198 200
      * @return $this
199 201
      */
200 202
     public function limit($limit, $page = 1){
201
-        if($page >= 1) $this->page = $page;
203
+        if($page >= 1) {
204
+            $this->page = $page;
205
+        }
202 206
         $this->limit = $limit;
203 207
 
204 208
         return $this;
Please login to merge, or discard this patch.