Passed
Push — master ( 310f46...0fdd8f )
by Malte
05:34
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))) {
@@ -389,9 +389,9 @@  discard block
 block discarded – undo
389 389
                 if (Str::startsWith(mb_strtolower($this->subject), '=?utf-8?')) {
390 390
                     $this->subject = mb_decode_mimeheader($header->subject);
391 391
                 }
392
-            }elseif($this->config['decoder']['message']['subject'] === 'iconv') {
392
+            } elseif($this->config['decoder']['message']['subject'] === 'iconv') {
393 393
                 $this->subject = iconv_mime_decode($header->subject);
394
-            }else{
394
+            } else{
395 395
                 $this->subject = mb_decode_mimeheader($header->subject);
396 396
             }
397 397
         }
@@ -902,9 +902,9 @@  discard block
 block discarded – undo
902 902
                     return EncodingAliases::get($parameter->value, $this->fallback_encoding);
903 903
                 }
904 904
             }
905
-        }elseif (property_exists($structure, 'charset')) {
905
+        } elseif (property_exists($structure, 'charset')) {
906 906
             return EncodingAliases::get($structure->charset, $this->fallback_encoding);
907
-        }elseif (is_string($structure) === true){
907
+        } elseif (is_string($structure) === true){
908 908
             return mb_detect_encoding($structure);
909 909
         }
910 910
 
@@ -970,7 +970,9 @@  discard block
 block discarded – undo
970 970
      */
971 971
     public function moveToFolder($mailbox = 'INBOX', $expunge = false, $create_folder = true) {
972 972
 
973
-        if($create_folder) $this->client->createFolder($mailbox, true);
973
+        if($create_folder) {
974
+            $this->client->createFolder($mailbox, true);
975
+        }
974 976
 
975 977
         $target_folder = $this->client->getFolder($mailbox);
976 978
         $target_status = $target_folder->getStatus(IMAP::SA_ALL);
@@ -979,7 +981,9 @@  discard block
 block discarded – undo
979 981
         $status = \imap_mail_move($this->client->getConnection(), $this->uid, $mailbox, IMAP::CP_UID);
980 982
 
981 983
         if($status === true){
982
-            if($expunge) $this->client->expunge();
984
+            if($expunge) {
985
+                $this->client->expunge();
986
+            }
983 987
             $this->client->openFolder($target_folder->path);
984 988
 
985 989
             $message = $target_folder->getMessage($target_status->uidnext, null, $this->fetch_options, $this->fetch_body, $this->fetch_attachment, $this->fetch_flags);
@@ -1001,7 +1005,9 @@  discard block
 block discarded – undo
1001 1005
         $this->client->openFolder($this->folder_path);
1002 1006
 
1003 1007
         $status = \imap_delete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
1004
-        if($expunge) $this->client->expunge();
1008
+        if($expunge) {
1009
+            $this->client->expunge();
1010
+        }
1005 1011
         MessageDeletedEvent::dispatch($this);
1006 1012
 
1007 1013
         return $status;
@@ -1018,7 +1024,9 @@  discard block
 block discarded – undo
1018 1024
         $this->client->openFolder($this->folder_path);
1019 1025
 
1020 1026
         $status = \imap_undelete($this->client->getConnection(), $this->uid, IMAP::FT_UID);
1021
-        if($expunge) $this->client->expunge();
1027
+        if($expunge) {
1028
+            $this->client->expunge();
1029
+        }
1022 1030
         MessageRestoredEvent::dispatch($this);
1023 1031
 
1024 1032
         return $status;
Please login to merge, or discard this patch.