@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $this->msglist = $msglist; |
187 | 187 | $this->client = $client; |
188 | 188 | |
189 | - $this->uid = ($this->fetch_options == FT_UID) ? $uid : $uid; |
|
189 | + $this->uid = ($this->fetch_options == FT_UID) ? $uid : $uid; |
|
190 | 190 | $this->msgn = ($this->fetch_options == FT_UID) ? imap_msgno($this->client->getConnection(), $uid) : $uid; |
191 | 191 | |
192 | 192 | $this->parseHeader(); |
@@ -293,9 +293,9 @@ discard block |
||
293 | 293 | $header = imap_rfc822_parse_headers($this->header); |
294 | 294 | } |
295 | 295 | |
296 | - if(preg_match('/x\-priority\:.*([0-9]{1,2})/i', $this->header, $priority)){ |
|
296 | + if (preg_match('/x\-priority\:.*([0-9]{1,2})/i', $this->header, $priority)) { |
|
297 | 297 | $priority = isset($priority[1]) ? (int) $priority[1] : 0; |
298 | - switch($priority){ |
|
298 | + switch ($priority) { |
|
299 | 299 | case self::PRIORITY_HIGHEST; |
300 | 300 | $this->priority = self::PRIORITY_HIGHEST; |
301 | 301 | break; |
@@ -481,12 +481,12 @@ discard block |
||
481 | 481 | public function parseBody() { |
482 | 482 | $structure = imap_fetchstructure($this->client->getConnection(), $this->uid, FT_UID); |
483 | 483 | |
484 | - if(property_exists($structure, 'parts')){ |
|
484 | + if (property_exists($structure, 'parts')) { |
|
485 | 485 | $parts = $structure->parts; |
486 | 486 | |
487 | - foreach ($parts as $part) { |
|
488 | - foreach ($part->parameters as $parameter) { |
|
489 | - if($parameter->attribute == "charset") { |
|
487 | + foreach ($parts as $part) { |
|
488 | + foreach ($part->parameters as $parameter) { |
|
489 | + if ($parameter->attribute == "charset") { |
|
490 | 490 | $encoding = $parameter->value; |
491 | 491 | |
492 | 492 | $encoding = preg_replace('/Content-Transfer-Encoding/', '', $encoding); |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | return EncodingAliases::get($parameter->value); |
727 | 727 | } |
728 | 728 | } |
729 | - }elseif (is_string($structure) === true){ |
|
729 | + }elseif (is_string($structure) === true) { |
|
730 | 730 | return mb_detect_encoding($structure); |
731 | 731 | } |
732 | 732 | |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | */ |
797 | 797 | public function delete($expunge = true) { |
798 | 798 | $status = imap_delete($this->client->getConnection(), $this->uid, FT_UID); |
799 | - if($expunge) $this->client->expunge(); |
|
799 | + if ($expunge) $this->client->expunge(); |
|
800 | 800 | |
801 | 801 | return $status; |
802 | 802 | } |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | */ |
811 | 811 | public function restore($expunge = true) { |
812 | 812 | $status = imap_undelete($this->client->getConnection(), $this->uid, FT_UID); |
813 | - if($expunge) $this->client->expunge(); |
|
813 | + if ($expunge) $this->client->expunge(); |
|
814 | 814 | |
815 | 815 | return $status; |
816 | 816 | } |