Passed
Push — master ( 22ef42...012447 )
by Malte
02:48
created
src/IMAP/Message.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $this->msglist = $msglist;
187 187
         $this->client = $client;
188 188
 
189
-        $this->uid =  ($this->fetch_options == FT_UID) ? $uid : $uid;
189
+        $this->uid = ($this->fetch_options == FT_UID) ? $uid : $uid;
190 190
         $this->msgn = ($this->fetch_options == FT_UID) ? imap_msgno($this->client->getConnection(), $uid) : $uid;
191 191
 
192 192
         $this->parseHeader();
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
             $header = imap_rfc822_parse_headers($this->header);
294 294
         }
295 295
 
296
-        if(preg_match('/x\-priority\:.*([0-9]{1,2})/i', $this->header, $priority)){
296
+        if (preg_match('/x\-priority\:.*([0-9]{1,2})/i', $this->header, $priority)) {
297 297
             $priority = isset($priority[1]) ? (int) $priority[1] : 0;
298
-            switch($priority){
298
+            switch ($priority) {
299 299
                 case self::PRIORITY_HIGHEST;
300 300
                     $this->priority = self::PRIORITY_HIGHEST;
301 301
                     break;
@@ -481,12 +481,12 @@  discard block
 block discarded – undo
481 481
     public function parseBody() {
482 482
         $structure = imap_fetchstructure($this->client->getConnection(), $this->uid, FT_UID);
483 483
 
484
-        if(property_exists($structure, 'parts')){
484
+        if (property_exists($structure, 'parts')) {
485 485
             $parts = $structure->parts;
486 486
 
487
-            foreach ($parts as $part)  {
488
-                foreach ($part->parameters as $parameter)  {
489
-                    if($parameter->attribute == "charset")  {
487
+            foreach ($parts as $part) {
488
+                foreach ($part->parameters as $parameter) {
489
+                    if ($parameter->attribute == "charset") {
490 490
                         $encoding = $parameter->value;
491 491
                         $parameter->value = preg_replace('/Content-Transfer-Encoding/', '', $encoding);
492 492
                     }
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
                     return EncodingAliases::get($parameter->value);
723 723
                 }
724 724
             }
725
-        }elseif (is_string($structure) === true){
725
+        }elseif (is_string($structure) === true) {
726 726
             return mb_detect_encoding($structure);
727 727
         }
728 728
 
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
      */
793 793
     public function delete($expunge = true) {
794 794
         $status = imap_delete($this->client->getConnection(), $this->uid, FT_UID);
795
-        if($expunge) $this->client->expunge();
795
+        if ($expunge) $this->client->expunge();
796 796
 
797 797
         return $status;
798 798
     }
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
      */
807 807
     public function restore($expunge = true) {
808 808
         $status = imap_undelete($this->client->getConnection(), $this->uid, FT_UID);
809
-        if($expunge) $this->client->expunge();
809
+        if ($expunge) $this->client->expunge();
810 810
 
811 811
         return $status;
812 812
     }
Please login to merge, or discard this patch.
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
                     return EncodingAliases::get($parameter->value);
723 723
                 }
724 724
             }
725
-        }elseif (is_string($structure) === true){
725
+        } elseif (is_string($structure) === true){
726 726
             return mb_detect_encoding($structure);
727 727
         }
728 728
 
@@ -792,7 +792,9 @@  discard block
 block discarded – undo
792 792
      */
793 793
     public function delete($expunge = true) {
794 794
         $status = imap_delete($this->client->getConnection(), $this->uid, FT_UID);
795
-        if($expunge) $this->client->expunge();
795
+        if($expunge) {
796
+            $this->client->expunge();
797
+        }
796 798
 
797 799
         return $status;
798 800
     }
@@ -806,7 +808,9 @@  discard block
 block discarded – undo
806 808
      */
807 809
     public function restore($expunge = true) {
808 810
         $status = imap_undelete($this->client->getConnection(), $this->uid, FT_UID);
809
-        if($expunge) $this->client->expunge();
811
+        if($expunge) {
812
+            $this->client->expunge();
813
+        }
810 814
 
811 815
         return $status;
812 816
     }
Please login to merge, or discard this patch.