@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | if(strtolower(substr($method, 0, 3)) === 'get') { |
306 | 306 | $name = Str::snake(substr($method, 3)); |
307 | 307 | return $this->get($name); |
308 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
308 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
309 | 309 | $name = Str::snake(substr($method, 3)); |
310 | 310 | |
311 | 311 | if(in_array($name, array_keys($this->attributes))) { |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | if ($this->getFlags()->get("seen") == null) { |
509 | 509 | $this->unsetFlag("Seen"); |
510 | 510 | } |
511 | - }elseif ($this->getFlags()->get("seen") != null) { |
|
511 | + } elseif ($this->getFlags()->get("seen") != null) { |
|
512 | 512 | $this->setFlag("Seen"); |
513 | 513 | } |
514 | 514 | } |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | private function fetchPart(Part $part) { |
551 | 551 | if ($part->isAttachment()) { |
552 | 552 | $this->fetchAttachment($part); |
553 | - }else{ |
|
553 | + } else{ |
|
554 | 554 | $encoding = $this->getEncoding($part); |
555 | 555 | |
556 | 556 | $content = $this->decodeString($part->content, $part->encoding); |
@@ -742,9 +742,9 @@ discard block |
||
742 | 742 | return EncodingAliases::get($parameter->value); |
743 | 743 | } |
744 | 744 | } |
745 | - }elseif (property_exists($structure, 'charset')){ |
|
745 | + } elseif (property_exists($structure, 'charset')){ |
|
746 | 746 | return EncodingAliases::get($structure->charset); |
747 | - }elseif (is_string($structure) === true){ |
|
747 | + } elseif (is_string($structure) === true){ |
|
748 | 748 | return mb_detect_encoding($structure); |
749 | 749 | } |
750 | 750 | |
@@ -924,13 +924,15 @@ discard block |
||
924 | 924 | * @throws MessageHeaderFetchingException |
925 | 925 | */ |
926 | 926 | protected function fetchNewMail($folder, $next_uid, $event, $expunge){ |
927 | - if($expunge) $this->client->expunge(); |
|
927 | + if($expunge) { |
|
928 | + $this->client->expunge(); |
|
929 | + } |
|
928 | 930 | |
929 | 931 | $this->client->openFolder($folder->path); |
930 | 932 | |
931 | 933 | if ($this->sequence === IMAP::ST_UID) { |
932 | 934 | $sequence_id = $next_uid; |
933 | - }else{ |
|
935 | + } else{ |
|
934 | 936 | $sequence_id = $this->client->getConnection()->getMessageNumber($next_uid); |
935 | 937 | } |
936 | 938 | |
@@ -952,7 +954,9 @@ discard block |
||
952 | 954 | */ |
953 | 955 | public function delete($expunge = true) { |
954 | 956 | $status = $this->setFlag("Deleted"); |
955 | - if($expunge) $this->client->expunge(); |
|
957 | + if($expunge) { |
|
958 | + $this->client->expunge(); |
|
959 | + } |
|
956 | 960 | |
957 | 961 | $event = $this->getEvent("message", "deleted"); |
958 | 962 | $event::dispatch($this); |
@@ -971,7 +975,9 @@ discard block |
||
971 | 975 | */ |
972 | 976 | public function restore($expunge = true) { |
973 | 977 | $status = $this->unsetFlag("Deleted"); |
974 | - if($expunge) $this->client->expunge(); |
|
978 | + if($expunge) { |
|
979 | + $this->client->expunge(); |
|
980 | + } |
|
975 | 981 | |
976 | 982 | $event = $this->getEvent("message", "restored"); |
977 | 983 | $event::dispatch($this); |
@@ -1384,7 +1390,7 @@ discard block |
||
1384 | 1390 | if ($this->getSequence() === IMAP::ST_UID) { |
1385 | 1391 | $this->setUid($uid); |
1386 | 1392 | $this->setMsglist($msglist); |
1387 | - }else{ |
|
1393 | + } else{ |
|
1388 | 1394 | $this->setMsgn($uid, $msglist); |
1389 | 1395 | } |
1390 | 1396 | } |