Passed
Push — master ( 84664a...96c441 )
by Malte
03:24
created
src/IMAP/Message.php 1 patch
Braces   +17 added lines, -9 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 return $this->attributes[$name];
246 246
             }
247 247
 
248
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
248
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
249 249
             $name = snake_case(substr($method, 3));
250 250
 
251 251
             if(in_array($name, array_keys($this->attributes))) {
@@ -365,9 +365,9 @@  discard block
 block discarded – undo
365 365
                 /** @var Attachment $oAttachment */
366 366
                 if(is_callable($replaceImages)) {
367 367
                     $body = $replaceImages($body, $oAttachment);
368
-                }elseif(is_string($replaceImages)) {
368
+                } elseif(is_string($replaceImages)) {
369 369
                     call_user_func($replaceImages, [$body, $oAttachment]);
370
-                }else{
370
+                } else{
371 371
                     if ($oAttachment->id && $oAttachment->getImgSrc() != null) {
372 372
                         $body = str_replace('cid:'.$oAttachment->id, $oAttachment->getImgSrc(), $body);
373 373
                     }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         if (property_exists($header, 'subject')) {
399 399
             if($this->config['decoder']['message']['subject'] === 'utf-8') {
400 400
                 $this->subject = imap_utf8($header->subject);
401
-            }else{
401
+            } else{
402 402
                 $this->subject = mb_decode_mimeheader($header->subject);
403 403
             }
404 404
         }
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
                     return EncodingAliases::get($parameter->value);
910 910
                 }
911 911
             }
912
-        }elseif (is_string($structure) === true){
912
+        } elseif (is_string($structure) === true){
913 913
             return mb_detect_encoding($structure);
914 914
         }
915 915
 
@@ -971,7 +971,9 @@  discard block
 block discarded – undo
971 971
      */
972 972
     public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) {
973 973
 
974
-        if($create_folder) $this->client->createFolder($mailbox, true);
974
+        if($create_folder) {
975
+            $this->client->createFolder($mailbox, true);
976
+        }
975 977
 
976 978
         $target_folder = $this->client->getFolder($mailbox);
977 979
         $target_status = $target_folder->getStatus(IMAP::SA_ALL);
@@ -980,7 +982,9 @@  discard block
 block discarded – undo
980 982
         $status = imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID);
981 983
 
982 984
         if($status === true){
983
-            if($expunge) $this->client->expunge();
985
+            if($expunge) {
986
+                $this->client->expunge();
987
+            }
984 988
             $this->client->openFolder($target_folder->path);
985 989
 
986 990
             return $target_folder->getMessage($target_status->uidnext, $this->msglist, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags);
@@ -1000,7 +1004,9 @@  discard block
 block discarded – undo
1000 1004
         $this->client->openFolder($this->folder_path);
1001 1005
 
1002 1006
         $status = imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
1003
-        if($expunge) $this->client->expunge();
1007
+        if($expunge) {
1008
+            $this->client->expunge();
1009
+        }
1004 1010
 
1005 1011
         return $status;
1006 1012
     }
@@ -1016,7 +1022,9 @@  discard block
 block discarded – undo
1016 1022
         $this->client->openFolder($this->folder_path);
1017 1023
 
1018 1024
         $status = imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
1019
-        if($expunge) $this->client->expunge();
1025
+        if($expunge) {
1026
+            $this->client->expunge();
1027
+        }
1020 1028
 
1021 1029
         return $status;
1022 1030
     }
Please login to merge, or discard this patch.