Completed
Push — master ( aa4b53...ce24f7 )
by Malte
02:16
created
src/Header.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 if ($prev_header !== null) {
189 189
                     $headers[$prev_header][] = $line;
190 190
                 }
191
-            }elseif (substr($line, 0, 1) === " ") {
191
+            } elseif (substr($line, 0, 1) === " ") {
192 192
                 $line = substr($line, 1);
193 193
                 $line = trim(rtrim($line));
194 194
                 if ($prev_header !== null) {
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
                     }
198 198
                     if (is_array($headers[$prev_header])) {
199 199
                         $headers[$prev_header][] = $line;
200
-                    }else{
200
+                    } else{
201 201
                         $headers[$prev_header] .= $line;
202 202
                     }
203 203
                 }
204
-            }else{
204
+            } else{
205 205
                 if (($pos = strpos($line, ":")) > 0) {
206 206
                     $key = trim(rtrim(strtolower(substr($line, 0, $pos))));
207 207
                     $value = trim(rtrim(substr($line, $pos + 1)));
@@ -212,7 +212,9 @@  discard block
 block discarded – undo
212 212
         }
213 213
 
214 214
         foreach($headers as $key => $values) {
215
-            if (isset($imap_headers[$key])) continue;
215
+            if (isset($imap_headers[$key])) {
216
+                continue;
217
+            }
216 218
             $value = null;
217 219
             switch($key){
218 220
                 case 'from':
@@ -349,9 +351,9 @@  discard block
 block discarded – undo
349 351
                     return EncodingAliases::get($parameter->value, $this->fallback_encoding);
350 352
                 }
351 353
             }
352
-        }elseif (property_exists($structure, 'charset')) {
354
+        } elseif (property_exists($structure, 'charset')) {
353 355
             return EncodingAliases::get($structure->charset, $this->fallback_encoding);
354
-        }elseif (is_string($structure) === true){
356
+        } elseif (is_string($structure) === true){
355 357
             return mb_detect_encoding($structure);
356 358
         }
357 359
 
@@ -382,9 +384,9 @@  discard block
 block discarded – undo
382 384
                         }
383 385
                     }
384 386
                 }
385
-            }elseif($decoder === 'iconv') {
387
+            } elseif($decoder === 'iconv') {
386 388
                 $value = iconv_mime_decode($value);
387
-            }else{
389
+            } else{
388 390
                 $value = mb_decode_mimeheader($value);
389 391
             }
390 392
 
@@ -404,7 +406,9 @@  discard block
 block discarded – undo
404 406
      * Try to extract the priority from a given raw header string
405 407
      */
406 408
     private function findPriority() {
407
-        if(($priority = $this->get("x-priority")) === null) return;
409
+        if(($priority = $this->get("x-priority")) === null) {
410
+            return;
411
+        }
408 412
         switch($priority){
409 413
             case IMAP::MESSAGE_PRIORITY_HIGHEST;
410 414
                 $priority = IMAP::MESSAGE_PRIORITY_HIGHEST;
Please login to merge, or discard this patch.