@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | if(strtolower(substr($method, 0, 3)) === 'get') { |
| 244 | 244 | $name = Str::snake(substr($method, 3)); |
| 245 | 245 | return $this->get($name); |
| 246 | - }elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 246 | + } elseif (strtolower(substr($method, 0, 3)) === 'set') { |
|
| 247 | 247 | $name = Str::snake(substr($method, 3)); |
| 248 | 248 | |
| 249 | 249 | if(in_array($name, array_keys($this->attributes))) { |
@@ -614,9 +614,9 @@ discard block |
||
| 614 | 614 | return EncodingAliases::get($parameter->value); |
| 615 | 615 | } |
| 616 | 616 | } |
| 617 | - }elseif (property_exists($structure, 'charset')){ |
|
| 617 | + } elseif (property_exists($structure, 'charset')){ |
|
| 618 | 618 | return EncodingAliases::get($structure->charset); |
| 619 | - }elseif (is_string($structure) === true){ |
|
| 619 | + } elseif (is_string($structure) === true){ |
|
| 620 | 620 | return mb_detect_encoding($structure); |
| 621 | 621 | } |
| 622 | 622 | |
@@ -660,7 +660,9 @@ discard block |
||
| 660 | 660 | |
| 661 | 661 | $this->client->openFolder($this->folder_path); |
| 662 | 662 | if ($this->client->getConnection()->copyMessage($folder->path, $this->msgn) == true) { |
| 663 | - if($expunge) $this->client->expunge(); |
|
| 663 | + if($expunge) { |
|
| 664 | + $this->client->expunge(); |
|
| 665 | + } |
|
| 664 | 666 | |
| 665 | 667 | $this->client->openFolder($folder->path); |
| 666 | 668 | $message_num = $this->client->getConnection()->getMessageNumber($next_uid); |
@@ -702,7 +704,9 @@ discard block |
||
| 702 | 704 | |
| 703 | 705 | $this->client->openFolder($this->folder_path); |
| 704 | 706 | if ($this->client->getConnection()->moveMessage($folder->path, $this->msgn) == true) { |
| 705 | - if($expunge) $this->client->expunge(); |
|
| 707 | + if($expunge) { |
|
| 708 | + $this->client->expunge(); |
|
| 709 | + } |
|
| 706 | 710 | |
| 707 | 711 | $this->client->openFolder($folder->path); |
| 708 | 712 | $message_num = $this->client->getConnection()->getMessageNumber($next_uid); |
@@ -729,7 +733,9 @@ discard block |
||
| 729 | 733 | */ |
| 730 | 734 | public function delete($expunge = true) { |
| 731 | 735 | $status = $this->setFlag("Deleted"); |
| 732 | - if($expunge) $this->client->expunge(); |
|
| 736 | + if($expunge) { |
|
| 737 | + $this->client->expunge(); |
|
| 738 | + } |
|
| 733 | 739 | |
| 734 | 740 | $event = $this->getEvent("message", "deleted"); |
| 735 | 741 | $event::dispatch($this); |
@@ -748,7 +754,9 @@ discard block |
||
| 748 | 754 | */ |
| 749 | 755 | public function restore($expunge = true) { |
| 750 | 756 | $status = $this->unsetFlag("Deleted"); |
| 751 | - if($expunge) $this->client->expunge(); |
|
| 757 | + if($expunge) { |
|
| 758 | + $this->client->expunge(); |
|
| 759 | + } |
|
| 752 | 760 | |
| 753 | 761 | $event = $this->getEvent("message", "restored"); |
| 754 | 762 | $event::dispatch($this); |