@@ -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,9 +399,9 @@ discard block |
||
| 399 | 399 | if (property_exists($header, 'subject')) { |
| 400 | 400 | if($this->config['decoder']['message']['subject'] === 'utf-8') { |
| 401 | 401 | $this->subject = \imap_utf8($header->subject); |
| 402 | - }elseif($this->config['decoder']['message']['subject'] === 'iconv') { |
|
| 402 | + } elseif($this->config['decoder']['message']['subject'] === 'iconv') { |
|
| 403 | 403 | $this->subject = iconv_mime_decode($header->subject); |
| 404 | - }else{ |
|
| 404 | + } else{ |
|
| 405 | 405 | $this->subject = mb_decode_mimeheader($header->subject); |
| 406 | 406 | } |
| 407 | 407 | } |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | return EncodingAliases::get($parameter->value); |
| 920 | 920 | } |
| 921 | 921 | } |
| 922 | - }elseif (is_string($structure) === true){ |
|
| 922 | + } elseif (is_string($structure) === true){ |
|
| 923 | 923 | return mb_detect_encoding($structure); |
| 924 | 924 | } |
| 925 | 925 | |
@@ -985,7 +985,9 @@ discard block |
||
| 985 | 985 | */ |
| 986 | 986 | public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) { |
| 987 | 987 | |
| 988 | - if($create_folder) $this->client->createFolder($mailbox, true); |
|
| 988 | + if($create_folder) { |
|
| 989 | + $this->client->createFolder($mailbox, true); |
|
| 990 | + } |
|
| 989 | 991 | |
| 990 | 992 | $target_folder = $this->client->getFolder($mailbox); |
| 991 | 993 | $target_status = $target_folder->getStatus(IMAP::SA_ALL); |
@@ -994,7 +996,9 @@ discard block |
||
| 994 | 996 | $status = \imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID); |
| 995 | 997 | |
| 996 | 998 | if($status === true){ |
| 997 | - if($expunge) $this->client->expunge(); |
|
| 999 | + if($expunge) { |
|
| 1000 | + $this->client->expunge(); |
|
| 1001 | + } |
|
| 998 | 1002 | $this->client->openFolder($target_folder->path); |
| 999 | 1003 | |
| 1000 | 1004 | return $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags); |
@@ -1014,7 +1018,9 @@ discard block |
||
| 1014 | 1018 | $this->client->openFolder($this->folder_path); |
| 1015 | 1019 | |
| 1016 | 1020 | $status = \imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
| 1017 | - if($expunge) $this->client->expunge(); |
|
| 1021 | + if($expunge) { |
|
| 1022 | + $this->client->expunge(); |
|
| 1023 | + } |
|
| 1018 | 1024 | |
| 1019 | 1025 | return $status; |
| 1020 | 1026 | } |
@@ -1030,7 +1036,9 @@ discard block |
||
| 1030 | 1036 | $this->client->openFolder($this->folder_path); |
| 1031 | 1037 | |
| 1032 | 1038 | $status = \imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
| 1033 | - if($expunge) $this->client->expunge(); |
|
| 1039 | + if($expunge) { |
|
| 1040 | + $this->client->expunge(); |
|
| 1041 | + } |
|
| 1034 | 1042 | |
| 1035 | 1043 | return $status; |
| 1036 | 1044 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | return null; |
| 125 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 125 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 126 | 126 | $name = Str::snake(substr($method, 3)); |
| 127 | 127 | |
| 128 | 128 | $this->attributes[$name] = array_pop($arguments); |
@@ -265,9 +265,9 @@ discard block |
||
| 265 | 265 | public function setName($name) { |
| 266 | 266 | if($this->config['decoder']['attachment']['name'] === 'utf-8') { |
| 267 | 267 | $this->name = \imap_utf8($name); |
| 268 | - }elseif($this->config['decoder']['attachment']['name'] === 'iconv') { |
|
| 268 | + } elseif($this->config['decoder']['attachment']['name'] === 'iconv') { |
|
| 269 | 269 | $this->name = iconv_mime_decode($name); |
| 270 | - }else{ |
|
| 270 | + } else{ |
|
| 271 | 271 | $this->name = mb_decode_mimeheader($name); |
| 272 | 272 | } |
| 273 | 273 | } |