Passed
Push — master ( d27f53...96eb05 )
by Malte
04:59
created
src/IMAP/Query/Query.php 1 patch
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,9 @@  discard block
 block discarded – undo
69 69
     public function __construct(Client $client, $charset = 'UTF-8') {
70 70
         $this->setClient($client);
71 71
 
72
-        if(config('imap.options.fetch') === IMAP::FT_PEEK) $this->leaveUnread();
72
+        if(config('imap.options.fetch') === IMAP::FT_PEEK) {
73
+            $this->leaveUnread();
74
+        }
73 75
 
74 76
         $this->date_format = config('imap.date_format', 'd M y');
75 77
 
@@ -107,7 +109,9 @@  discard block
 block discarded – undo
107 109
      * @throws MessageSearchValidationException
108 110
      */
109 111
     protected function parse_date($date) {
110
-        if($date instanceof \Carbon\Carbon) return $date;
112
+        if($date instanceof \Carbon\Carbon) {
113
+            return $date;
114
+        }
111 115
 
112 116
         try {
113 117
             $date = Carbon::parse($date);
@@ -159,7 +163,7 @@  discard block
 block discarded – undo
159 163
         try {
160 164
             if ($this->getCharset() == null) {
161 165
                 $available_messages = \imap_search($this->getClient()->getConnection(), $this->getRawQuery(), IMAP::SE_UID);
162
-            }else{
166
+            } else{
163 167
                 $available_messages = \imap_search($this->getClient()->getConnection(), $this->getRawQuery(), IMAP::SE_UID, $this->getCharset());
164 168
             }
165 169
         } catch (\Exception $e) {
@@ -300,7 +304,7 @@  discard block
 block discarded – undo
300 304
             } else {
301 305
                 if($statement[1] === null){
302 306
                     $query .= $statement[0];
303
-                }else{
307
+                } else{
304 308
                     $query .= $statement[0].' "'.$statement[1].'"';
305 309
                 }
306 310
             }
@@ -330,7 +334,9 @@  discard block
 block discarded – undo
330 334
      * @return $this
331 335
      */
332 336
     public function limit($limit, $page = 1) {
333
-        if($page >= 1) $this->page = $page;
337
+        if($page >= 1) {
338
+            $this->page = $page;
339
+        }
334 340
         $this->limit = $limit;
335 341
 
336 342
         return $this;
Please login to merge, or discard this patch.