Passed
Push — master ( 46d81a...373720 )
by Malte
02:11
created
src/Header.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                 if ($prev_header !== null) {
193 193
                     $headers[$prev_header][] = $line;
194 194
                 }
195
-            }elseif (substr($line, 0, 1) === " ") {
195
+            } elseif (substr($line, 0, 1) === " ") {
196 196
                 $line = substr($line, 1);
197 197
                 $line = trim(rtrim($line));
198 198
                 if ($prev_header !== null) {
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
                     }
202 202
                     if (is_array($headers[$prev_header])) {
203 203
                         $headers[$prev_header][] = $line;
204
-                    }else{
204
+                    } else{
205 205
                         $headers[$prev_header] .= $line;
206 206
                     }
207 207
                 }
208
-            }else{
208
+            } else{
209 209
                 if (($pos = strpos($line, ":")) > 0) {
210 210
                     $key = trim(rtrim(strtolower(substr($line, 0, $pos))));
211 211
                     $key = str_replace("-", "_", $key);
@@ -218,7 +218,9 @@  discard block
 block discarded – undo
218 218
         }
219 219
 
220 220
         foreach($headers as $key => $values) {
221
-            if (isset($imap_headers[$key])) continue;
221
+            if (isset($imap_headers[$key])) {
222
+                continue;
223
+            }
222 224
             $value = null;
223 225
             switch($key){
224 226
                 case 'from':
@@ -355,9 +357,9 @@  discard block
 block discarded – undo
355 357
                     return EncodingAliases::get($parameter->value, $this->fallback_encoding);
356 358
                 }
357 359
             }
358
-        }elseif (property_exists($structure, 'charset')) {
360
+        } elseif (property_exists($structure, 'charset')) {
359 361
             return EncodingAliases::get($structure->charset, $this->fallback_encoding);
360
-        }elseif (is_string($structure) === true){
362
+        } elseif (is_string($structure) === true){
361 363
             return mb_detect_encoding($structure);
362 364
         }
363 365
 
@@ -391,9 +393,9 @@  discard block
 block discarded – undo
391 393
                         }
392 394
                     }
393 395
                 }
394
-            }elseif($decoder === 'iconv') {
396
+            } elseif($decoder === 'iconv') {
395 397
                 $value = iconv_mime_decode($value);
396
-            }else{
398
+            } else{
397 399
                 $value = mb_decode_mimeheader($value);
398 400
             }
399 401
 
@@ -426,7 +428,9 @@  discard block
 block discarded – undo
426 428
      * Try to extract the priority from a given raw header string
427 429
      */
428 430
     private function findPriority() {
429
-        if(($priority = $this->get("x_priority")) === null) return;
431
+        if(($priority = $this->get("x_priority")) === null) {
432
+            return;
433
+        }
430 434
         switch($priority){
431 435
             case IMAP::MESSAGE_PRIORITY_HIGHEST;
432 436
                 $priority = IMAP::MESSAGE_PRIORITY_HIGHEST;
Please login to merge, or discard this patch.