Completed
Push — master ( 47f6d8...94e3f2 )
by Malte
02:56
created
src/IMAP/Query/WhereQuery.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
             foreach($criteria as $arguments){
78 78
                 if(count($arguments) == 1){
79 79
                     $this->where($arguments[0]);
80
-                }elseif(count($arguments) == 2){
80
+                } elseif(count($arguments) == 2){
81 81
                     $this->where($arguments[0], $arguments[1]);
82 82
                 }
83 83
             }
84
-        }else{
84
+        } else{
85 85
             $criteria = $this->validate_criteria($criteria);
86 86
             $value = $this->parse_value($value);
87 87
 
88 88
             if($value === null || $value === ''){
89 89
                 $this->query->push([$criteria]);
90
-            }else{
90
+            } else{
91 91
                 $this->query->push([$criteria, $value]);
92 92
             }
93 93
         }
@@ -102,7 +102,9 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function orWhere(\Closure $closure = null) {
104 104
         $this->query->push(['OR']);
105
-        if($closure !== null) $closure($this);
105
+        if($closure !== null) {
106
+            $closure($this);
107
+        }
106 108
 
107 109
         return $this;
108 110
     }
@@ -114,7 +116,9 @@  discard block
 block discarded – undo
114 116
      */
115 117
     public function andWhere(\Closure $closure = null) {
116 118
         $this->query->push(['AND']);
117
-        if($closure !== null) $closure($this);
119
+        if($closure !== null) {
120
+            $closure($this);
121
+        }
118 122
 
119 123
         return $this;
120 124
     }
Please login to merge, or discard this patch.
src/IMAP/Query/Query.php 1 patch
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@  discard block
 block discarded – undo
64 64
     public function __construct(Client $client, $charset = 'UTF-8') {
65 65
         $this->setClient($client);
66 66
 
67
-        if(config('imap.options.fetch') === FT_PEEK) $this->leaveUnread();
67
+        if(config('imap.options.fetch') === FT_PEEK) {
68
+            $this->leaveUnread();
69
+        }
68 70
 
69 71
         $this->charset = $charset;
70 72
         $this->query = collect();
@@ -100,7 +102,9 @@  discard block
 block discarded – undo
100 102
      * @throws MessageSearchValidationException
101 103
      */
102 104
     protected function parse_date($date) {
103
-        if($date instanceof \Carbon\Carbon) return $date;
105
+        if($date instanceof \Carbon\Carbon) {
106
+            return $date;
107
+        }
104 108
 
105 109
         try {
106 110
             $date = Carbon::parse($date);
@@ -151,7 +155,7 @@  discard block
 block discarded – undo
151 155
              */
152 156
             if($this->getCharset() === null){
153 157
                 $available_messages = imap_search($this->getClient()->getConnection(), $this->getRawQuery(), SE_UID);
154
-            }else{
158
+            } else{
155 159
                 $available_messages = imap_search($this->getClient()->getConnection(), $this->getRawQuery(), SE_UID, $this->getCharset());
156 160
             }
157 161
 
@@ -203,7 +207,7 @@  discard block
 block discarded – undo
203 207
             } else {
204 208
                 if($statement[1] === null){
205 209
                     $query .= $statement[0];
206
-                }else{
210
+                } else{
207 211
                     $query .= $statement[0].' "'.$statement[1].'"';
208 212
                 }
209 213
             }
@@ -232,7 +236,9 @@  discard block
 block discarded – undo
232 236
      * @return $this
233 237
      */
234 238
     public function limit($limit, $page = 1) {
235
-        if($page >= 1) $this->page = $page;
239
+        if($page >= 1) {
240
+            $this->page = $page;
241
+        }
236 242
         $this->limit = $limit;
237 243
 
238 244
         return $this;
Please login to merge, or discard this patch.
src/IMAP/Providers/LaravelServiceProvider.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,11 +114,15 @@  discard block
 block discarded – undo
114 114
         $arrays = func_get_args();
115 115
         $base = array_shift($arrays);
116 116
 
117
-        if(!is_array($base)) $base = empty($base) ? array() : array($base);
117
+        if(!is_array($base)) {
118
+            $base = empty($base) ? array() : array($base);
119
+        }
118 120
 
119 121
         foreach($arrays as $append) {
120 122
 
121
-            if(!is_array($append)) $append = array($append);
123
+            if(!is_array($append)) {
124
+                $append = array($append);
125
+            }
122 126
 
123 127
             foreach($append as $key => $value) {
124 128
 
@@ -130,7 +134,9 @@  discard block
 block discarded – undo
130 134
                 if(is_array($value) or is_array($base[$key])) {
131 135
                     $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]);
132 136
                 } else if(is_numeric($key)) {
133
-                    if(!in_array($value, $base)) $base[] = $value;
137
+                    if(!in_array($value, $base)) {
138
+                        $base[] = $value;
139
+                    }
134 140
                 } else {
135 141
                     $base[$key] = $value;
136 142
                 }
Please login to merge, or discard this patch.
src/IMAP/Message.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -710,7 +710,7 @@
 block discarded – undo
710 710
                     return strtoupper($parameter->value);
711 711
                 }
712 712
             }
713
-        }elseif (is_string($structure) === true){
713
+        } elseif (is_string($structure) === true){
714 714
             return mb_detect_encoding($structure);
715 715
         }
716 716
 
Please login to merge, or discard this patch.