@@ -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))) { |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | if ($this->getFlags()->get("seen") == null) { |
| 512 | 512 | $this->unsetFlag("Seen"); |
| 513 | 513 | } |
| 514 | - }elseif ($this->getFlags()->get("seen") != null) { |
|
| 514 | + } elseif ($this->getFlags()->get("seen") != null) { |
|
| 515 | 515 | $this->setFlag("Seen"); |
| 516 | 516 | } |
| 517 | 517 | } |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | private function fetchPart(Part $part) { |
| 556 | 556 | if ($part->isAttachment()) { |
| 557 | 557 | $this->fetchAttachment($part); |
| 558 | - }else{ |
|
| 558 | + } else{ |
|
| 559 | 559 | $encoding = $this->getEncoding($part); |
| 560 | 560 | |
| 561 | 561 | $content = $this->decodeString($part->content, $part->encoding); |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | |
| 581 | 581 | if (isset($this->bodies[$subtype])) { |
| 582 | 582 | $this->bodies[$subtype] .= "\n".$content; |
| 583 | - }else{ |
|
| 583 | + } else{ |
|
| 584 | 584 | $this->bodies[$subtype] = $content; |
| 585 | 585 | } |
| 586 | 586 | } |
@@ -751,9 +751,9 @@ discard block |
||
| 751 | 751 | return EncodingAliases::get($parameter->value); |
| 752 | 752 | } |
| 753 | 753 | } |
| 754 | - }elseif (property_exists($structure, 'charset')){ |
|
| 754 | + } elseif (property_exists($structure, 'charset')){ |
|
| 755 | 755 | return EncodingAliases::get($structure->charset); |
| 756 | - }elseif (is_string($structure) === true){ |
|
| 756 | + } elseif (is_string($structure) === true){ |
|
| 757 | 757 | return mb_detect_encoding($structure); |
| 758 | 758 | } |
| 759 | 759 | |
@@ -937,13 +937,15 @@ discard block |
||
| 937 | 937 | * @throws MessageHeaderFetchingException |
| 938 | 938 | */ |
| 939 | 939 | protected function fetchNewMail($folder, $next_uid, $event, $expunge){ |
| 940 | - if($expunge) $this->client->expunge(); |
|
| 940 | + if($expunge) { |
|
| 941 | + $this->client->expunge(); |
|
| 942 | + } |
|
| 941 | 943 | |
| 942 | 944 | $this->client->openFolder($folder->path); |
| 943 | 945 | |
| 944 | 946 | if ($this->sequence === IMAP::ST_UID) { |
| 945 | 947 | $sequence_id = $next_uid; |
| 946 | - }else{ |
|
| 948 | + } else{ |
|
| 947 | 949 | $sequence_id = $this->client->getConnection()->getMessageNumber($next_uid); |
| 948 | 950 | } |
| 949 | 951 | |
@@ -966,7 +968,9 @@ discard block |
||
| 966 | 968 | */ |
| 967 | 969 | public function delete($expunge = true) { |
| 968 | 970 | $status = $this->setFlag("Deleted"); |
| 969 | - if($expunge) $this->client->expunge(); |
|
| 971 | + if($expunge) { |
|
| 972 | + $this->client->expunge(); |
|
| 973 | + } |
|
| 970 | 974 | |
| 971 | 975 | $event = $this->getEvent("message", "deleted"); |
| 972 | 976 | $event::dispatch($this); |
@@ -986,7 +990,9 @@ discard block |
||
| 986 | 990 | */ |
| 987 | 991 | public function restore($expunge = true) { |
| 988 | 992 | $status = $this->unsetFlag("Deleted"); |
| 989 | - if($expunge) $this->client->expunge(); |
|
| 993 | + if($expunge) { |
|
| 994 | + $this->client->expunge(); |
|
| 995 | + } |
|
| 990 | 996 | |
| 991 | 997 | $event = $this->getEvent("message", "restored"); |
| 992 | 998 | $event::dispatch($this); |
@@ -1405,7 +1411,7 @@ discard block |
||
| 1405 | 1411 | if ($this->getSequence() === IMAP::ST_UID) { |
| 1406 | 1412 | $this->setUid($uid); |
| 1407 | 1413 | $this->setMsglist($msglist); |
| 1408 | - }else{ |
|
| 1414 | + } else{ |
|
| 1409 | 1415 | $this->setMsgn($uid, $msglist); |
| 1410 | 1416 | } |
| 1411 | 1417 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $content_type = (is_array($content_type)) ? implode(' ', $content_type) : $content_type; |
| 92 | 92 | if(stripos($content_type, 'multipart') === 0) { |
| 93 | 93 | $this->type = IMAP::MESSAGE_TYPE_MULTIPART; |
| 94 | - }else{ |
|
| 94 | + } else{ |
|
| 95 | 95 | $this->type = IMAP::MESSAGE_TYPE_TEXT; |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | foreach($match[1] as $matched){ |
| 144 | 144 | $boundaries[] = $this->clearBoundaryString($matched); |
| 145 | 145 | } |
| 146 | - }else{ |
|
| 146 | + } else{ |
|
| 147 | 147 | if(!empty($match[1])) { |
| 148 | 148 | $boundaries[] = $this->clearBoundaryString($match[1]); |
| 149 | 149 | } |