Passed
Push — master ( 5127af...662963 )
by Malte
02:15
created
src/Header.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                 if ($prev_header !== null) {
186 186
                     $headers[$prev_header][] = $line;
187 187
                 }
188
-            }elseif (substr($line, 0, 1) === " ") {
188
+            } elseif (substr($line, 0, 1) === " ") {
189 189
                 $line = substr($line, 1);
190 190
                 $line = trim(rtrim($line));
191 191
                 if ($prev_header !== null) {
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
                     }
195 195
                     if (is_array($headers[$prev_header])) {
196 196
                         $headers[$prev_header][] = $line;
197
-                    }else{
197
+                    } else{
198 198
                         $headers[$prev_header] .= $line;
199 199
                     }
200 200
                 }
201
-            }else{
201
+            } else{
202 202
                 if (($pos = strpos($line, ":")) > 0) {
203 203
                     $key = trim(rtrim(strtolower(substr($line, 0, $pos))));
204 204
                     $value = trim(rtrim(strtolower(substr($line, $pos + 1))));
@@ -209,7 +209,9 @@  discard block
 block discarded – undo
209 209
         }
210 210
 
211 211
         foreach($headers as $key => $values) {
212
-            if (isset($imap_headers[$key])) continue;
212
+            if (isset($imap_headers[$key])) {
213
+                continue;
214
+            }
213 215
             $value = null;
214 216
             switch($key){
215 217
                 case 'from':
@@ -346,9 +348,9 @@  discard block
 block discarded – undo
346 348
                     return EncodingAliases::get($parameter->value, $this->fallback_encoding);
347 349
                 }
348 350
             }
349
-        }elseif (property_exists($structure, 'charset')) {
351
+        } elseif (property_exists($structure, 'charset')) {
350 352
             return EncodingAliases::get($structure->charset, $this->fallback_encoding);
351
-        }elseif (is_string($structure) === true){
353
+        } elseif (is_string($structure) === true){
352 354
             return mb_detect_encoding($structure);
353 355
         }
354 356
 
@@ -379,9 +381,9 @@  discard block
 block discarded – undo
379 381
                         }
380 382
                     }
381 383
                 }
382
-            }elseif($decoder === 'iconv') {
384
+            } elseif($decoder === 'iconv') {
383 385
                 $value = iconv_mime_decode($value);
384
-            }else{
386
+            } else{
385 387
                 $value = mb_decode_mimeheader($value);
386 388
             }
387 389
 
@@ -401,7 +403,9 @@  discard block
 block discarded – undo
401 403
      * Try to extract the priority from a given raw header string
402 404
      */
403 405
     private function findPriority() {
404
-        if(($priority = $this->get("x-priority")) === null) return;
406
+        if(($priority = $this->get("x-priority")) === null) {
407
+            return;
408
+        }
405 409
         switch($priority){
406 410
             case IMAP::MESSAGE_PRIORITY_HIGHEST;
407 411
                 $priority = IMAP::MESSAGE_PRIORITY_HIGHEST;
Please login to merge, or discard this patch.