@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | return null; |
122 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
122 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
123 | 123 | $name = Str::snake(substr($method, 3)); |
124 | 124 | |
125 | 125 | $this->attributes[$name] = array_pop($arguments); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | public function setName($name) { |
259 | 259 | if($this->config['decoder']['message']['subject'] === 'utf-8') { |
260 | 260 | $this->name = imap_utf8($name); |
261 | - }else{ |
|
261 | + } else{ |
|
262 | 262 | $this->name = mb_decode_mimeheader($name); |
263 | 263 | } |
264 | 264 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | return $this->attributes[$name]; |
68 | 68 | } |
69 | 69 | |
70 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
70 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
71 | 71 | $name = Str::snake(substr($method, 3)); |
72 | 72 | |
73 | 73 | if(isset($this->attributes[$name])) { |
@@ -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 = imap_utf8($header->subject); |
402 | - }else{ |
|
402 | + } else{ |
|
403 | 403 | $this->subject = mb_decode_mimeheader($header->subject); |
404 | 404 | } |
405 | 405 | } |
@@ -915,7 +915,7 @@ discard block |
||
915 | 915 | return EncodingAliases::get($parameter->value); |
916 | 916 | } |
917 | 917 | } |
918 | - }elseif (is_string($structure) === true){ |
|
918 | + } elseif (is_string($structure) === true){ |
|
919 | 919 | return mb_detect_encoding($structure); |
920 | 920 | } |
921 | 921 | |
@@ -981,7 +981,9 @@ discard block |
||
981 | 981 | */ |
982 | 982 | public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) { |
983 | 983 | |
984 | - if($create_folder) $this->client->createFolder($mailbox, true); |
|
984 | + if($create_folder) { |
|
985 | + $this->client->createFolder($mailbox, true); |
|
986 | + } |
|
985 | 987 | |
986 | 988 | $target_folder = $this->client->getFolder($mailbox); |
987 | 989 | $target_status = $target_folder->getStatus(IMAP::SA_ALL); |
@@ -990,7 +992,9 @@ discard block |
||
990 | 992 | $status = imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID); |
991 | 993 | |
992 | 994 | if($status === true){ |
993 | - if($expunge) $this->client->expunge(); |
|
995 | + if($expunge) { |
|
996 | + $this->client->expunge(); |
|
997 | + } |
|
994 | 998 | $this->client->openFolder($target_folder->path); |
995 | 999 | |
996 | 1000 | return $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags); |
@@ -1010,7 +1014,9 @@ discard block |
||
1010 | 1014 | $this->client->openFolder($this->folder_path); |
1011 | 1015 | |
1012 | 1016 | $status = imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
1013 | - if($expunge) $this->client->expunge(); |
|
1017 | + if($expunge) { |
|
1018 | + $this->client->expunge(); |
|
1019 | + } |
|
1014 | 1020 | |
1015 | 1021 | return $status; |
1016 | 1022 | } |
@@ -1026,7 +1032,9 @@ discard block |
||
1026 | 1032 | $this->client->openFolder($this->folder_path); |
1027 | 1033 | |
1028 | 1034 | $status = imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID); |
1029 | - if($expunge) $this->client->expunge(); |
|
1035 | + if($expunge) { |
|
1036 | + $this->client->expunge(); |
|
1037 | + } |
|
1030 | 1038 | |
1031 | 1039 | return $status; |
1032 | 1040 | } |