Passed
Push — master ( 1c981f...6990ab )
by Malte
03:43
created
src/IMAP/Message.php 1 patch
Braces   +17 added lines, -9 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 return $this->attributes[$name];
237 237
             }
238 238
 
239
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
239
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
240 240
             $name = snake_case(substr($method, 3));
241 241
 
242 242
             if(isset($this->attributes[$name])) {
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
                 /** @var Attachment $oAttachment */
355 355
                 if(is_callable($replaceImages)) {
356 356
                     $body = $replaceImages($body, $oAttachment);
357
-                }elseif(is_string($replaceImages)) {
357
+                } elseif(is_string($replaceImages)) {
358 358
                     call_user_func($replaceImages, [$body, $oAttachment]);
359
-                }else{
359
+                } else{
360 360
                     if ($oAttachment->id && $oAttachment->getImgSrc() != null) {
361 361
                         $body = str_replace('cid:'.$oAttachment->id, $oAttachment->getImgSrc(), $body);
362 362
                     }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         if (property_exists($header, 'subject')) {
387 387
             if($this->config['decoder']['message']['subject'] === 'utf-8') {
388 388
                 $this->subject = imap_utf8($header->subject);
389
-            }else{
389
+            } else{
390 390
                 $this->subject = mb_decode_mimeheader($header->subject);
391 391
             }
392 392
         }
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
                     return EncodingAliases::get($parameter->value);
895 895
                 }
896 896
             }
897
-        }elseif (is_string($structure) === true){
897
+        } elseif (is_string($structure) === true){
898 898
             return mb_detect_encoding($structure);
899 899
         }
900 900
 
@@ -956,14 +956,18 @@  discard block
 block discarded – undo
956 956
      */
957 957
     public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) {
958 958
 
959
-        if($create_folder) $this->client->createFolder($mailbox, true);
959
+        if($create_folder) {
960
+            $this->client->createFolder($mailbox, true);
961
+        }
960 962
 
961 963
         $target_folder = $this->client->getFolder($mailbox);
962 964
         $target_status = $target_folder->getStatus(IMAP::SA_ALL);
963 965
 
964 966
         $status = imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID);
965 967
         if($status === true){
966
-            if($expunge) $this->client->expunge();
968
+            if($expunge) {
969
+                $this->client->expunge();
970
+            }
967 971
 
968 972
             return $target_folder->getMessage($target_status->uidnext);
969 973
         }
@@ -980,7 +984,9 @@  discard block
 block discarded – undo
980 984
      */
981 985
     public function delete($expunge = true) {
982 986
         $status = imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
983
-        if($expunge) $this->client->expunge();
987
+        if($expunge) {
988
+            $this->client->expunge();
989
+        }
984 990
 
985 991
         return $status;
986 992
     }
@@ -994,7 +1000,9 @@  discard block
 block discarded – undo
994 1000
      */
995 1001
     public function restore($expunge = true) {
996 1002
         $status = imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
997
-        if($expunge) $this->client->expunge();
1003
+        if($expunge) {
1004
+            $this->client->expunge();
1005
+        }
998 1006
 
999 1007
         return $status;
1000 1008
     }
Please login to merge, or discard this patch.