@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | return $this->attributes[$name]; |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 249 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 250 | 250 | $name = Str::snake(substr($method, 3)); |
| 251 | 251 | |
| 252 | 252 | if(in_array($name, array_keys($this->attributes))) { |
@@ -366,9 +366,9 @@ discard block |
||
| 366 | 366 | /** @var Attachment $oAttachment */ |
| 367 | 367 | if(is_callable($replaceImages)) { |
| 368 | 368 | $body = $replaceImages($body, $oAttachment); |
| 369 | - }elseif(is_string($replaceImages)) { |
|
| 369 | + } elseif(is_string($replaceImages)) { |
|
| 370 | 370 | call_user_func($replaceImages, [$body, $oAttachment]); |
| 371 | - }else{ |
|
| 371 | + } else{ |
|
| 372 | 372 | if ($oAttachment->id && $oAttachment->getImgSrc() != null) { |
| 373 | 373 | $body = str_replace('cid:'.$oAttachment->id, $oAttachment->getImgSrc(), $body); |
| 374 | 374 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | if (property_exists($header, 'subject')) { |
| 400 | 400 | if($this->config['decoder']['message']['subject'] === 'utf-8') { |
| 401 | 401 | $this->subject = iconv_mime_decode($header->subject, 2, "UTF-8"); |
| 402 | - }else{ |
|
| 402 | + } else{ |
|
| 403 | 403 | $this->subject = mb_decode_mimeheader($header->subject); |
| 404 | 404 | } |
| 405 | 405 | } |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | return EncodingAliases::get($parameter->value); |
| 918 | 918 | } |
| 919 | 919 | } |
| 920 | - }elseif (is_string($structure) === true){ |
|
| 920 | + } elseif (is_string($structure) === true){ |
|
| 921 | 921 | return mb_detect_encoding($structure); |
| 922 | 922 | } |
| 923 | 923 | |
@@ -983,7 +983,9 @@ discard block |
||
| 983 | 983 | */ |
| 984 | 984 | public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) { |
| 985 | 985 | |
| 986 | - if($create_folder) $this->client->createFolder($mailbox, true); |
|
| 986 | + if($create_folder) { |
|
| 987 | + $this->client->createFolder($mailbox, true); |
|
| 988 | + } |
|
| 987 | 989 | |
| 988 | 990 | $target_folder = $this->client->getFolder($mailbox); |
| 989 | 991 | $target_status = $target_folder->getStatus(IMAP::SA_ALL); |
@@ -992,7 +994,9 @@ discard block |
||
| 992 | 994 | $status = \imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID); |
| 993 | 995 | |
| 994 | 996 | if($status === true){ |
| 995 | - if($expunge) $this->client->expunge(); |
|
| 997 | + if($expunge) { |
|
| 998 | + $this->client->expunge(); |
|
| 999 | + } |
|
| 996 | 1000 | $this->client->openFolder($target_folder->path); |
| 997 | 1001 | |
| 998 | 1002 | return $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags); |
@@ -1012,7 +1016,9 @@ discard block |
||
| 1012 | 1016 | $this->client->openFolder($this->folder_path); |
| 1013 | 1017 | |
| 1014 | 1018 | $status = \imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
| 1015 | - if($expunge) $this->client->expunge(); |
|
| 1019 | + if($expunge) { |
|
| 1020 | + $this->client->expunge(); |
|
| 1021 | + } |
|
| 1016 | 1022 | |
| 1017 | 1023 | return $status; |
| 1018 | 1024 | } |
@@ -1028,7 +1034,9 @@ discard block |
||
| 1028 | 1034 | $this->client->openFolder($this->folder_path); |
| 1029 | 1035 | |
| 1030 | 1036 | $status = \imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
| 1031 | - if($expunge) $this->client->expunge(); |
|
| 1037 | + if($expunge) { |
|
| 1038 | + $this->client->expunge(); |
|
| 1039 | + } |
|
| 1032 | 1040 | |
| 1033 | 1041 | return $status; |
| 1034 | 1042 | } |