Completed
Push — master ( cd9168...92912a )
by Malte
02:14
created
src/Message.php 1 patch
Braces   +17 added lines, -11 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         if ($this->sequence === IMAP::ST_UID) {
228 228
             $this->uid = $uid;
229 229
             $this->msgn = $this->client->getConnection()->getMessageNumber($this->uid);
230
-        }else{
230
+        } else{
231 231
             $this->msgn = $uid;
232 232
             $this->uid = $this->client->getConnection()->getUid($this->msgn);
233 233
         }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         if ($instance->getSequence() === IMAP::ST_UID) {
295 295
             $instance->setUid($uid);
296 296
             $instance->setMsglist($msglist);
297
-        }else{
297
+        } else{
298 298
             $instance->setMsgn($uid, $msglist);
299 299
         }
300 300
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
         if(strtolower(substr($method, 0, 3)) === 'get') {
319 319
             $name = Str::snake(substr($method, 3));
320 320
             return $this->get($name);
321
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
321
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
322 322
             $name = Str::snake(substr($method, 3));
323 323
 
324 324
             if(in_array($name, array_keys($this->attributes))) {
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
             if ($this->getFlags()->get("seen") == null) {
522 522
                 $this->unsetFlag("Seen");
523 523
             }
524
-        }elseif ($this->getFlags()->get("seen") != null) {
524
+        } elseif ($this->getFlags()->get("seen") != null) {
525 525
             $this->setFlag("Seen");
526 526
         }
527 527
     }
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
     private function fetchPart(Part $part) {
564 564
         if ($part->isAttachment()) {
565 565
             $this->fetchAttachment($part);
566
-        }else{
566
+        } else{
567 567
             $encoding = $this->getEncoding($part);
568 568
 
569 569
             $content = $this->decodeString($part->content, $part->encoding);
@@ -755,9 +755,9 @@  discard block
 block discarded – undo
755 755
                     return EncodingAliases::get($parameter->value);
756 756
                 }
757 757
             }
758
-        }elseif (property_exists($structure, 'charset')){
758
+        } elseif (property_exists($structure, 'charset')){
759 759
             return EncodingAliases::get($structure->charset);
760
-        }elseif (is_string($structure) === true){
760
+        } elseif (is_string($structure) === true){
761 761
             return mb_detect_encoding($structure);
762 762
         }
763 763
 
@@ -937,13 +937,15 @@  discard block
 block discarded – undo
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
 
@@ -965,7 +967,9 @@  discard block
 block discarded – undo
965 967
      */
966 968
     public function delete($expunge = true) {
967 969
         $status = $this->setFlag("Deleted");
968
-        if($expunge) $this->client->expunge();
970
+        if($expunge) {
971
+            $this->client->expunge();
972
+        }
969 973
 
970 974
         $event = $this->getEvent("message", "deleted");
971 975
         $event::dispatch($this);
@@ -984,7 +988,9 @@  discard block
 block discarded – undo
984 988
      */
985 989
     public function restore($expunge = true) {
986 990
         $status = $this->unsetFlag("Deleted");
987
-        if($expunge) $this->client->expunge();
991
+        if($expunge) {
992
+            $this->client->expunge();
993
+        }
988 994
 
989 995
         $event = $this->getEvent("message", "restored");
990 996
         $event::dispatch($this);
Please login to merge, or discard this patch.