Completed
Push — 5.x ( ef5d14...158fb7 )
by Lars
09:14
created
lib/classes/Swift/Mime/SimpleMimeEntity.php 1 patch
Spacing   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function getId()
243 243
     {
244
-        $tmp = (array)$this->_getHeaderFieldModel($this->_getIdField());
244
+        $tmp = (array) $this->_getHeaderFieldModel($this->_getIdField());
245 245
 
246 246
         return $this->_headers->has($this->_getIdField()) ? current($tmp) : $this->_id;
247 247
     }
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
     public function getBoundary()
469 469
     {
470 470
         if (!isset($this->_boundary)) {
471
-            $this->_boundary = '_=_swift_v5_' . time() . '_' . md5(getmypid() . mt_rand() . uniqid('', true)) . '_=_';
471
+            $this->_boundary = '_=_swift_v5_'.time().'_'.md5(getmypid().mt_rand().uniqid('', true)).'_=_';
472 472
         }
473 473
 
474 474
         return $this->_boundary;
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
             if ($this->_cache->hasKey($this->_cacheKey, 'body')) {
544 544
                 $body = $this->_cache->getString($this->_cacheKey, 'body');
545 545
             } else {
546
-                $body = "\r\n" . $this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength());
546
+                $body = "\r\n".$this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength());
547 547
                 $this->_cache->setString($this->_cacheKey, 'body', $body, Swift_KeyCache::MODE_WRITE);
548 548
             }
549 549
             $string .= $body;
@@ -551,10 +551,10 @@  discard block
 block discarded – undo
551 551
 
552 552
         if (!empty($this->_immediateChildren)) {
553 553
             foreach ($this->_immediateChildren as $child) {
554
-                $string .= "\r\n\r\n--" . $this->getBoundary() . "\r\n";
554
+                $string .= "\r\n\r\n--".$this->getBoundary()."\r\n";
555 555
                 $string .= $child->toString();
556 556
             }
557
-            $string .= "\r\n\r\n--" . $this->getBoundary() . "--\r\n";
557
+            $string .= "\r\n\r\n--".$this->getBoundary()."--\r\n";
558 558
         }
559 559
 
560 560
         return $string;
@@ -621,10 +621,10 @@  discard block
 block discarded – undo
621 621
 
622 622
         if (!empty($this->_immediateChildren)) {
623 623
             foreach ($this->_immediateChildren as $child) {
624
-                $is->write("\r\n\r\n--" . $this->getBoundary() . "\r\n");
624
+                $is->write("\r\n\r\n--".$this->getBoundary()."\r\n");
625 625
                 $child->toByteStream($is);
626 626
             }
627
-            $is->write("\r\n\r\n--" . $this->getBoundary() . "--\r\n");
627
+            $is->write("\r\n\r\n--".$this->getBoundary()."--\r\n");
628 628
         }
629 629
     }
630 630
 
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      */
754 754
     private function _generateNewCacheKey()
755 755
     {
756
-        return md5(getmypid() . '.' . time() . '.' . uniqid(mt_rand(), true));
756
+        return md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true));
757 757
     }
758 758
 
759 759
     /**
@@ -849,10 +849,10 @@  discard block
 block discarded – undo
849 849
         $lowercaseType = Swift::strtolowerWithStaticCache($child->getContentType());
850 850
 
851 851
         if (isset($filter[$realLevel], $filter[$realLevel][$lowercaseType])) {
852
-            return (int)$filter[$realLevel][$lowercaseType];
852
+            return (int) $filter[$realLevel][$lowercaseType];
853 853
         }
854 854
 
855
-        return (int)$realLevel;
855
+        return (int) $realLevel;
856 856
     }
857 857
 
858 858
     /**
@@ -903,8 +903,7 @@  discard block
 block discarded – undo
903 903
             foreach ($this->_immediateChildren as $child) {
904 904
                 $type = $child->getContentType();
905 905
                 $level = array_key_exists($type, $this->_alternativePartOrder) ?
906
-                    $this->_alternativePartOrder[$type] :
907
-                    max($this->_alternativePartOrder) + 1;
906
+                    $this->_alternativePartOrder[$type] : max($this->_alternativePartOrder) + 1;
908 907
 
909 908
                 if (empty($sorted[$level])) {
910 909
                     $sorted[$level] = array();
Please login to merge, or discard this patch.