@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | return $this->attributes[$name]; |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 252 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 253 | 253 | $name = Str::snake(substr($method, 3)); |
| 254 | 254 | |
| 255 | 255 | if(in_array($name, array_keys($this->attributes))) { |
@@ -379,9 +379,9 @@ discard block |
||
| 379 | 379 | if (property_exists($header, 'subject')) { |
| 380 | 380 | if($this->config['decoder']['message']['subject'] === 'utf-8') { |
| 381 | 381 | $this->subject = \imap_utf8($header->subject); |
| 382 | - }elseif($this->config['decoder']['message']['subject'] === 'iconv') { |
|
| 382 | + } elseif($this->config['decoder']['message']['subject'] === 'iconv') { |
|
| 383 | 383 | $this->subject = iconv_mime_decode($header->subject); |
| 384 | - }else{ |
|
| 384 | + } else{ |
|
| 385 | 385 | $this->subject = mb_decode_mimeheader($header->subject); |
| 386 | 386 | } |
| 387 | 387 | } |
@@ -899,7 +899,7 @@ discard block |
||
| 899 | 899 | return EncodingAliases::get($parameter->value); |
| 900 | 900 | } |
| 901 | 901 | } |
| 902 | - }elseif (is_string($structure) === true){ |
|
| 902 | + } elseif (is_string($structure) === true){ |
|
| 903 | 903 | return mb_detect_encoding($structure); |
| 904 | 904 | } |
| 905 | 905 | |
@@ -965,7 +965,9 @@ discard block |
||
| 965 | 965 | */ |
| 966 | 966 | public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) { |
| 967 | 967 | |
| 968 | - if($create_folder) $this->client->createFolder($mailbox, true); |
|
| 968 | + if($create_folder) { |
|
| 969 | + $this->client->createFolder($mailbox, true); |
|
| 970 | + } |
|
| 969 | 971 | |
| 970 | 972 | $target_folder = $this->client->getFolder($mailbox); |
| 971 | 973 | $target_status = $target_folder->getStatus(IMAP::SA_ALL); |
@@ -974,7 +976,9 @@ discard block |
||
| 974 | 976 | $status = \imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID); |
| 975 | 977 | |
| 976 | 978 | if($status === true){ |
| 977 | - if($expunge) $this->client->expunge(); |
|
| 979 | + if($expunge) { |
|
| 980 | + $this->client->expunge(); |
|
| 981 | + } |
|
| 978 | 982 | $this->client->openFolder($target_folder->path); |
| 979 | 983 | |
| 980 | 984 | $message = $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags); |
@@ -996,7 +1000,9 @@ discard block |
||
| 996 | 1000 | $this->client->openFolder($this->folder_path); |
| 997 | 1001 | |
| 998 | 1002 | $status = \imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
| 999 | - if($expunge) $this->client->expunge(); |
|
| 1003 | + if($expunge) { |
|
| 1004 | + $this->client->expunge(); |
|
| 1005 | + } |
|
| 1000 | 1006 | MessageDeletedEvent::dispatch($this); |
| 1001 | 1007 | |
| 1002 | 1008 | return $status; |
@@ -1013,7 +1019,9 @@ discard block |
||
| 1013 | 1019 | $this->client->openFolder($this->folder_path); |
| 1014 | 1020 | |
| 1015 | 1021 | $status = \imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
| 1016 | - if($expunge) $this->client->expunge(); |
|
| 1022 | + if($expunge) { |
|
| 1023 | + $this->client->expunge(); |
|
| 1024 | + } |
|
| 1017 | 1025 | MessageRestoredEvent::dispatch($this); |
| 1018 | 1026 | |
| 1019 | 1027 | return $status; |