Passed
Push — master ( decd81...881ae2 )
by Malte
03:28
created
src/Message.php 1 patch
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         if(strtolower(substr($method, 0, 3)) === 'get') {
245 245
             $name = Str::snake(substr($method, 3));
246 246
             return $this->get($name);
247
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
247
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
248 248
             $name = Str::snake(substr($method, 3));
249 249
 
250 250
             if(in_array($name, array_keys($this->attributes))) {
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 
441 441
         if ($part->isAttachment()) {
442 442
             $this->fetchAttachment($part);
443
-        }else{
443
+        } else{
444 444
             $encoding = $this->getEncoding($part);
445 445
 
446 446
             $content = $this->decodeString($part->content, $part->encoding);
@@ -616,9 +616,9 @@  discard block
 block discarded – undo
616 616
                     return EncodingAliases::get($parameter->value);
617 617
                 }
618 618
             }
619
-        }elseif (property_exists($structure, 'charset')){
619
+        } elseif (property_exists($structure, 'charset')){
620 620
             return EncodingAliases::get($structure->charset);
621
-        }elseif (is_string($structure) === true){
621
+        } elseif (is_string($structure) === true){
622 622
             return mb_detect_encoding($structure);
623 623
         }
624 624
 
@@ -719,7 +719,9 @@  discard block
 block discarded – undo
719 719
 
720 720
             $this->client->openFolder($this->folder_path);
721 721
             if ($this->client->getConnection()->copyMessage($folder->path, $this->msgn) == true) {
722
-                if($expunge) $this->client->expunge();
722
+                if($expunge) {
723
+                    $this->client->expunge();
724
+                }
723 725
 
724 726
                 $this->client->openFolder($folder->path);
725 727
                 $message_num = $this->client->getConnection()->getMessageNumber($next_uid);
@@ -761,7 +763,9 @@  discard block
 block discarded – undo
761 763
 
762 764
             $this->client->openFolder($this->folder_path);
763 765
             if ($this->client->getConnection()->moveMessage($folder->path, $this->msgn) == true) {
764
-                if($expunge) $this->client->expunge();
766
+                if($expunge) {
767
+                    $this->client->expunge();
768
+                }
765 769
 
766 770
                 $this->client->openFolder($folder->path);
767 771
                 $message_num = $this->client->getConnection()->getMessageNumber($next_uid);
@@ -788,7 +792,9 @@  discard block
 block discarded – undo
788 792
      */
789 793
     public function delete($expunge = true) {
790 794
         $status = $this->setFlag("Deleted");
791
-        if($expunge) $this->client->expunge();
795
+        if($expunge) {
796
+            $this->client->expunge();
797
+        }
792 798
 
793 799
         $event = $this->getEvent("message", "deleted");
794 800
         $event::dispatch($this);
@@ -807,7 +813,9 @@  discard block
 block discarded – undo
807 813
      */
808 814
     public function restore($expunge = true) {
809 815
         $status = $this->unsetFlag("Deleted");
810
-        if($expunge) $this->client->expunge();
816
+        if($expunge) {
817
+            $this->client->expunge();
818
+        }
811 819
 
812 820
         $event = $this->getEvent("message", "restored");
813 821
         $event::dispatch($this);
Please login to merge, or discard this patch.