Passed
Push — master ( 594562...23c80e )
by Malte
02:16
created
src/Message.php 1 patch
Braces   +17 added lines, -11 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         if(strtolower(substr($method, 0, 3)) === 'get') {
301 301
             $name = Str::snake(substr($method, 3));
302 302
             return $this->get($name);
303
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
303
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
304 304
             $name = Str::snake(substr($method, 3));
305 305
 
306 306
             if(in_array($name, array_keys($this->attributes))) {
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
             if ($this->getFlags()->get("seen") == null) {
507 507
                 $this->unsetFlag("Seen");
508 508
             }
509
-        }elseif ($this->getFlags()->get("seen") != null) {
509
+        } elseif ($this->getFlags()->get("seen") != null) {
510 510
             $this->setFlag("Seen");
511 511
         }
512 512
     }
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
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);
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 
576 576
             if (isset($this->bodies[$subtype])) {
577 577
                 $this->bodies[$subtype] .= "\n".$content;
578
-            }else{
578
+            } else{
579 579
                 $this->bodies[$subtype] = $content;
580 580
             }
581 581
         }
@@ -746,9 +746,9 @@  discard block
 block discarded – undo
746 746
                     return EncodingAliases::get($parameter->value);
747 747
                 }
748 748
             }
749
-        }elseif (property_exists($structure, 'charset')){
749
+        } elseif (property_exists($structure, 'charset')){
750 750
             return EncodingAliases::get($structure->charset);
751
-        }elseif (is_string($structure) === true){
751
+        } elseif (is_string($structure) === true){
752 752
             return mb_detect_encoding($structure);
753 753
         }
754 754
 
@@ -935,13 +935,15 @@  discard block
 block discarded – undo
935 935
      * @throws MessageHeaderFetchingException
936 936
      */
937 937
     protected function fetchNewMail($folder, $next_uid, $event, $expunge){
938
-        if($expunge) $this->client->expunge();
938
+        if($expunge) {
939
+            $this->client->expunge();
940
+        }
939 941
 
940 942
         $this->client->openFolder($folder->path);
941 943
 
942 944
         if ($this->sequence === IMAP::ST_UID) {
943 945
             $sequence_id = $next_uid;
944
-        }else{
946
+        } else{
945 947
             $sequence_id = $this->client->getConnection()->getMessageNumber($next_uid);
946 948
         }
947 949
 
@@ -970,7 +972,9 @@  discard block
 block discarded – undo
970 972
             $trash_path = $trash_path === null ? $this->config["common_folders"]["trash"]: $trash_path;
971 973
             $status = $this->move($trash_path);
972 974
         }
973
-        if($expunge) $this->client->expunge();
975
+        if($expunge) {
976
+            $this->client->expunge();
977
+        }
974 978
 
975 979
         $event = $this->getEvent("message", "deleted");
976 980
         $event::dispatch($this);
@@ -990,7 +994,9 @@  discard block
 block discarded – undo
990 994
      */
991 995
     public function restore($expunge = true) {
992 996
         $status = $this->unsetFlag("Deleted");
993
-        if($expunge) $this->client->expunge();
997
+        if($expunge) {
998
+            $this->client->expunge();
999
+        }
994 1000
 
995 1001
         $event = $this->getEvent("message", "restored");
996 1002
         $event::dispatch($this);
@@ -1418,7 +1424,7 @@  discard block
 block discarded – undo
1418 1424
         if ($this->getSequence() === IMAP::ST_UID) {
1419 1425
             $this->setUid($uid);
1420 1426
             $this->setMsglist($msglist);
1421
-        }else{
1427
+        } else{
1422 1428
             $this->setMsgn($uid, $msglist);
1423 1429
         }
1424 1430
     }
Please login to merge, or discard this patch.