@@ -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))) { |
@@ -369,9 +369,9 @@ discard block |
||
369 | 369 | /** @var Attachment $oAttachment */ |
370 | 370 | if(is_callable($replaceImages)) { |
371 | 371 | $body = $replaceImages($body, $oAttachment); |
372 | - }elseif(is_string($replaceImages)) { |
|
372 | + } elseif(is_string($replaceImages)) { |
|
373 | 373 | call_user_func($replaceImages, [$body, $oAttachment]); |
374 | - }else{ |
|
374 | + } else{ |
|
375 | 375 | if ($oAttachment->id && $oAttachment->getImgSrc() != null) { |
376 | 376 | $body = str_replace('cid:'.$oAttachment->id, $oAttachment->getImgSrc(), $body); |
377 | 377 | } |
@@ -402,9 +402,9 @@ discard block |
||
402 | 402 | if (property_exists($header, 'subject')) { |
403 | 403 | if($this->config['decoder']['message']['subject'] === 'utf-8') { |
404 | 404 | $this->subject = \imap_utf8($header->subject); |
405 | - }elseif($this->config['decoder']['message']['subject'] === 'iconv') { |
|
405 | + } elseif($this->config['decoder']['message']['subject'] === 'iconv') { |
|
406 | 406 | $this->subject = iconv_mime_decode($header->subject); |
407 | - }else{ |
|
407 | + } else{ |
|
408 | 408 | $this->subject = mb_decode_mimeheader($header->subject); |
409 | 409 | } |
410 | 410 | } |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | return EncodingAliases::get($parameter->value); |
923 | 923 | } |
924 | 924 | } |
925 | - }elseif (is_string($structure) === true){ |
|
925 | + } elseif (is_string($structure) === true){ |
|
926 | 926 | return mb_detect_encoding($structure); |
927 | 927 | } |
928 | 928 | |
@@ -988,7 +988,9 @@ discard block |
||
988 | 988 | */ |
989 | 989 | public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) { |
990 | 990 | |
991 | - if($create_folder) $this->client->createFolder($mailbox, true); |
|
991 | + if($create_folder) { |
|
992 | + $this->client->createFolder($mailbox, true); |
|
993 | + } |
|
992 | 994 | |
993 | 995 | $target_folder = $this->client->getFolder($mailbox); |
994 | 996 | $target_status = $target_folder->getStatus(IMAP::SA_ALL); |
@@ -997,7 +999,9 @@ discard block |
||
997 | 999 | $status = \imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID); |
998 | 1000 | |
999 | 1001 | if($status === true){ |
1000 | - if($expunge) $this->client->expunge(); |
|
1002 | + if($expunge) { |
|
1003 | + $this->client->expunge(); |
|
1004 | + } |
|
1001 | 1005 | $this->client->openFolder($target_folder->path); |
1002 | 1006 | |
1003 | 1007 | $message = $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags); |
@@ -1019,7 +1023,9 @@ discard block |
||
1019 | 1023 | $this->client->openFolder($this->folder_path); |
1020 | 1024 | |
1021 | 1025 | $status = \imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
1022 | - if($expunge) $this->client->expunge(); |
|
1026 | + if($expunge) { |
|
1027 | + $this->client->expunge(); |
|
1028 | + } |
|
1023 | 1029 | MessageDeletedEvent::dispatch($this); |
1024 | 1030 | |
1025 | 1031 | return $status; |
@@ -1036,7 +1042,9 @@ discard block |
||
1036 | 1042 | $this->client->openFolder($this->folder_path); |
1037 | 1043 | |
1038 | 1044 | $status = \imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
1039 | - if($expunge) $this->client->expunge(); |
|
1045 | + if($expunge) { |
|
1046 | + $this->client->expunge(); |
|
1047 | + } |
|
1040 | 1048 | MessageRestoredEvent::dispatch($this); |
1041 | 1049 | |
1042 | 1050 | return $status; |