@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($prev_header !== null) { |
169 | 169 | $headers[$prev_header][] = $line; |
170 | 170 | } |
171 | - }else{ |
|
171 | + } else{ |
|
172 | 172 | if (($pos = strpos($line, ":")) > 0) { |
173 | 173 | $key = strtolower(substr($line, 0, $pos)); |
174 | 174 | $value = trim(rtrim(strtolower(substr($line, $pos + 1)))); |
@@ -179,7 +179,9 @@ discard block |
||
179 | 179 | } |
180 | 180 | |
181 | 181 | foreach($headers as $key => $values) { |
182 | - if (isset($imap_headers[$key])) continue; |
|
182 | + if (isset($imap_headers[$key])) { |
|
183 | + continue; |
|
184 | + } |
|
183 | 185 | $value = null; |
184 | 186 | switch($key){ |
185 | 187 | case 'from': |
@@ -297,9 +299,9 @@ discard block |
||
297 | 299 | return EncodingAliases::get($parameter->value, $this->fallback_encoding); |
298 | 300 | } |
299 | 301 | } |
300 | - }elseif (property_exists($structure, 'charset')) { |
|
302 | + } elseif (property_exists($structure, 'charset')) { |
|
301 | 303 | return EncodingAliases::get($structure->charset, $this->fallback_encoding); |
302 | - }elseif (is_string($structure) === true){ |
|
304 | + } elseif (is_string($structure) === true){ |
|
303 | 305 | return mb_detect_encoding($structure); |
304 | 306 | } |
305 | 307 | |
@@ -330,9 +332,9 @@ discard block |
||
330 | 332 | } |
331 | 333 | } |
332 | 334 | } |
333 | - }elseif($decoder === 'iconv') { |
|
335 | + } elseif($decoder === 'iconv') { |
|
334 | 336 | $value = iconv_mime_decode($value); |
335 | - }else{ |
|
337 | + } else{ |
|
336 | 338 | $value = mb_decode_mimeheader($value); |
337 | 339 | } |
338 | 340 | |
@@ -352,7 +354,9 @@ discard block |
||
352 | 354 | * Try to extract the priority from a given raw header string |
353 | 355 | */ |
354 | 356 | private function findPriority() { |
355 | - if(($priority = $this->get("x-priority")) === null) return; |
|
357 | + if(($priority = $this->get("x-priority")) === null) { |
|
358 | + return; |
|
359 | + } |
|
356 | 360 | switch($priority){ |
357 | 361 | case IMAP::MESSAGE_PRIORITY_HIGHEST; |
358 | 362 | $priority = IMAP::MESSAGE_PRIORITY_HIGHEST; |