Passed
Push — master ( 91f2bd...b0bac1 )
by Malte
04:28
created
src/IMAP/Message.php 1 patch
Braces   +17 added lines, -9 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 return $this->attributes[$name];
257 257
             }
258 258
 
259
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
259
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
260 260
             $name = Str::snake(substr($method, 3));
261 261
 
262 262
             if(in_array($name, array_keys($this->attributes))) {
@@ -386,9 +386,9 @@  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
-            }elseif($this->config['decoder']['message']['subject'] === 'iconv') {
389
+            } elseif($this->config['decoder']['message']['subject'] === 'iconv') {
390 390
                 $this->subject = iconv_mime_decode($header->subject);
391
-            }else{
391
+            } else{
392 392
                 $this->subject = mb_decode_mimeheader($header->subject);
393 393
             }
394 394
         }
@@ -905,9 +905,9 @@  discard block
 block discarded – undo
905 905
                     return EncodingAliases::get($parameter->value, $this->fallback_encoding);
906 906
                 }
907 907
             }
908
-        }elseif (property_exists($structure, 'charset')) {
908
+        } elseif (property_exists($structure, 'charset')) {
909 909
             return EncodingAliases::get($structure->charset, $this->fallback_encoding);
910
-        }elseif (is_string($structure) === true){
910
+        } elseif (is_string($structure) === true){
911 911
             return mb_detect_encoding($structure);
912 912
         }
913 913
 
@@ -973,7 +973,9 @@  discard block
 block discarded – undo
973 973
      */
974 974
     public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) {
975 975
 
976
-        if($create_folder) $this->client->createFolder($mailbox, true);
976
+        if($create_folder) {
977
+            $this->client->createFolder($mailbox, true);
978
+        }
977 979
 
978 980
         $target_folder = $this->client->getFolder($mailbox);
979 981
         $target_status = $target_folder->getStatus(IMAP::SA_ALL);
@@ -982,7 +984,9 @@  discard block
 block discarded – undo
982 984
         $status = \imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID);
983 985
 
984 986
         if($status === true){
985
-            if($expunge) $this->client->expunge();
987
+            if($expunge) {
988
+                $this->client->expunge();
989
+            }
986 990
             $this->client->openFolder($target_folder->path);
987 991
 
988 992
             $message = $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags);
@@ -1004,7 +1008,9 @@  discard block
 block discarded – undo
1004 1008
         $this->client->openFolder($this->folder_path);
1005 1009
 
1006 1010
         $status = \imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
1007
-        if($expunge) $this->client->expunge();
1011
+        if($expunge) {
1012
+            $this->client->expunge();
1013
+        }
1008 1014
         MessageDeletedEvent::dispatch($this);
1009 1015
 
1010 1016
         return $status;
@@ -1021,7 +1027,9 @@  discard block
 block discarded – undo
1021 1027
         $this->client->openFolder($this->folder_path);
1022 1028
 
1023 1029
         $status = \imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
1024
-        if($expunge) $this->client->expunge();
1030
+        if($expunge) {
1031
+            $this->client->expunge();
1032
+        }
1025 1033
         MessageRestoredEvent::dispatch($this);
1026 1034
 
1027 1035
         return $status;
Please login to merge, or discard this patch.