Completed
Pull Request — 5.x (#23)
by Lars
07:46
created
lib/classes/Swift/Mime/Headers/PathHeader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
     {
127 127
         if (!$this->getCachedValue()) {
128 128
             if (isset($this->_address)) {
129
-                $this->setCachedValue('<' . $this->_address . '>');
129
+                $this->setCachedValue('<'.$this->_address.'>');
130 130
             }
131 131
         }
132 132
 
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/SimpleMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -560,7 +560,7 @@
 block discarded – undo
560 560
     {
561 561
         $this->attach($entity);
562 562
 
563
-        return 'cid:' . $entity->getId();
563
+        return 'cid:'.$entity->getId();
564 564
     }
565 565
 
566 566
     /**
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     protected function getSafeMapShareId()
39 39
     {
40
-        return get_class($this) . ($this->_dotEscape ? '.dotEscape' : '');
40
+        return get_class($this).($this->_dotEscape ? '.dotEscape' : '');
41 41
     }
42 42
 
43 43
     protected function initSafeMap()
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $newLineLength = $lineLen + ($i === false ? $size : $i);
101 101
 
102 102
             if ($currentLine && $newLineLength >= $thisLineLength) {
103
-                $is->write($prepend . $this->_standardize($currentLine));
103
+                $is->write($prepend.$this->_standardize($currentLine));
104 104
                 $currentLine = '';
105 105
                 $prepend = "=\r\n";
106 106
                 $thisLineLength = $maxLineLength;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         }
119 119
 
120 120
         if ($currentLine !== '') {
121
-            $is->write($prepend . $this->_standardize($currentLine));
121
+            $is->write($prepend.$this->_standardize($currentLine));
122 122
         }
123 123
     }
124 124
 
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             if ($atEOF) {
47 47
                 $streamTheseBytes = $base64ReadBufferRemainderBytes;
48 48
             } else {
49
-                $streamTheseBytes = $base64ReadBufferRemainderBytes . $readBytes;
49
+                $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes;
50 50
             }
51 51
 
52 52
             $base64ReadBufferRemainderBytes = null;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset;
72 72
 
73 73
             while ($thisMaxLineLength < strlen($encoded)) {
74
-                $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n";
74
+                $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n";
75 75
                 $firstLineOffset = 0;
76 76
                 $encoded = substr($encoded, $thisMaxLineLength);
77 77
                 $thisMaxLineLength = $maxLineLength;
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $leftOver = '';
73 73
         while (false !== $bytes = $os->read(8192)) {
74
-            $toencode = $leftOver . $bytes;
74
+            $toencode = $leftOver.$bytes;
75 75
 
76 76
             if ($this->_canonical) {
77 77
                 $toencode = $this->_canonicalize($toencode);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 if (
141 141
                     $currentLine !== ''
142 142
                     &&
143
-                    strlen($currentLine . $chunk) > $length
143
+                    strlen($currentLine.$chunk) > $length
144 144
                 ) {
145 145
                     $lines[] = '';
146 146
                     $currentLine = &$lines[$lineCount++];
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/SimpleMimeEntity.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
     public function getBoundary()
466 466
     {
467 467
         if (!isset($this->_boundary)) {
468
-            $this->_boundary = '_=_swift_v5_' . time() . '_' . md5(getmypid() . mt_rand() . uniqid('', true)) . '_=_';
468
+            $this->_boundary = '_=_swift_v5_'.time().'_'.md5(getmypid().mt_rand().uniqid('', true)).'_=_';
469 469
         }
470 470
 
471 471
         return $this->_boundary;
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             if ($this->_cache->hasKey($this->_cacheKey, 'body')) {
537 537
                 $body = $this->_cache->getString($this->_cacheKey, 'body');
538 538
             } else {
539
-                $body = "\r\n" . $this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength());
539
+                $body = "\r\n".$this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength());
540 540
                 $this->_cache->setString($this->_cacheKey, 'body', $body, Swift_KeyCache::MODE_WRITE);
541 541
             }
542 542
             $string .= $body;
@@ -544,10 +544,10 @@  discard block
 block discarded – undo
544 544
 
545 545
         if (!empty($this->_immediateChildren)) {
546 546
             foreach ($this->_immediateChildren as $child) {
547
-                $string .= "\r\n\r\n--" . $this->getBoundary() . "\r\n";
547
+                $string .= "\r\n\r\n--".$this->getBoundary()."\r\n";
548 548
                 $string .= $child->toString();
549 549
             }
550
-            $string .= "\r\n\r\n--" . $this->getBoundary() . "--\r\n";
550
+            $string .= "\r\n\r\n--".$this->getBoundary()."--\r\n";
551 551
         }
552 552
 
553 553
         return $string;
@@ -614,10 +614,10 @@  discard block
 block discarded – undo
614 614
 
615 615
         if (!empty($this->_immediateChildren)) {
616 616
             foreach ($this->_immediateChildren as $child) {
617
-                $is->write("\r\n\r\n--" . $this->getBoundary() . "\r\n");
617
+                $is->write("\r\n\r\n--".$this->getBoundary()."\r\n");
618 618
                 $child->toByteStream($is);
619 619
             }
620
-            $is->write("\r\n\r\n--" . $this->getBoundary() . "--\r\n");
620
+            $is->write("\r\n\r\n--".$this->getBoundary()."--\r\n");
621 621
         }
622 622
     }
623 623
 
@@ -746,14 +746,14 @@  discard block
 block discarded – undo
746 746
      */
747 747
     protected function getRandomId()
748 748
     {
749
-        $idLeft = md5(getmypid() . '.' . time() . '.' . uniqid(mt_rand(), true));
749
+        $idLeft = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true));
750 750
         $idRight = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated';
751
-        $id = $idLeft . '@' . $idRight;
751
+        $id = $idLeft.'@'.$idRight;
752 752
 
753 753
         try {
754 754
             $this->_assertValidId($id);
755 755
         } catch (Swift_RfcComplianceException $e) {
756
-            $id = $idLeft . '@swift.generated';
756
+            $id = $idLeft.'@swift.generated';
757 757
         }
758 758
 
759 759
         return $id;
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
      */
767 767
     private function _generateNewCacheKey()
768 768
     {
769
-        return md5(uniqid(getmypid() . mt_rand(), true));
769
+        return md5(uniqid(getmypid().mt_rand(), true));
770 770
     }
771 771
 
772 772
     private function _readStream(Swift_OutputByteStream $os)
@@ -849,10 +849,10 @@  discard block
 block discarded – undo
849 849
         $lowercaseType = Swift::strtolowerWithStaticCache($child->getContentType());
850 850
 
851 851
         if (isset($filter[$realLevel]) && isset($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
     /**
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
     private function _assertValidId($id)
949 949
     {
950 950
         if ($this->_emailValidator->isValidWrapper($id) === false) {
951
-            throw new Swift_RfcComplianceException('Invalid ID given <' . $id . '>');
951
+            throw new Swift_RfcComplianceException('Invalid ID given <'.$id.'>');
952 952
         }
953 953
     }
954 954
 
Please login to merge, or discard this patch.
lib/classes/Swift/Transport/EsmtpTransport.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function setPort($port)
93 93
     {
94
-        $this->_params['port'] = (int)$port;
94
+        $this->_params['port'] = (int) $port;
95 95
 
96 96
         return $this;
97 97
     }
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function setTimeout($timeout)
117 117
     {
118
-        $this->_params['timeout'] = (int)$timeout;
119
-        $this->_buffer->setParam('timeout', (int)$timeout);
118
+        $this->_params['timeout'] = (int) $timeout;
119
+        $this->_buffer->setParam('timeout', (int) $timeout);
120 120
 
121 121
         return $this;
122 122
     }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function executeCommand($command, $codes = array(), &$failures = null)
260 260
     {
261
-        $failures = (array)$failures;
261
+        $failures = (array) $failures;
262 262
         $stopSignal = false;
263 263
         $response = null;
264 264
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 
292 292
             $inArray = in_array(
293 293
                 strtolower($method),
294
-                array_map('strtolower', (array)$handler->exposeMixinMethods()),
294
+                array_map('strtolower', (array) $handler->exposeMixinMethods()),
295 295
                 true
296 296
             );
297 297
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                 }
311 311
             }
312 312
         }
313
-        trigger_error('Call to undefined method ' . $method, E_USER_ERROR);
313
+        trigger_error('Call to undefined method '.$method, E_USER_ERROR);
314 314
     }
315 315
 
316 316
     /** Get the params to initialize the buffer */
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
 
377 377
         $params = array();
378 378
         foreach ($handlers as $handler) {
379
-            $params = array_merge($params, (array)$handler->getMailParams());
379
+            $params = array_merge($params, (array) $handler->getMailParams());
380 380
         }
381 381
 
382
-        $paramStr = !empty($params) ? ' ' . implode(' ', $params) : '';
382
+        $paramStr = !empty($params) ? ' '.implode(' ', $params) : '';
383 383
         $this->executeCommand(
384 384
             sprintf("MAIL FROM:<%s>%s\r\n", $address, $paramStr), array(250)
385 385
         );
@@ -396,10 +396,10 @@  discard block
 block discarded – undo
396 396
 
397 397
         $params = array();
398 398
         foreach ($handlers as $handler) {
399
-            $params = array_merge($params, (array)$handler->getRcptParams());
399
+            $params = array_merge($params, (array) $handler->getRcptParams());
400 400
         }
401 401
 
402
-        $paramStr = !empty($params) ? ' ' . implode(' ', $params) : '';
402
+        $paramStr = !empty($params) ? ' '.implode(' ', $params) : '';
403 403
         $this->executeCommand(
404 404
             sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), array(250, 251, 252)
405 405
         );
Please login to merge, or discard this patch.
lib/classes/Swift/Transport/MailTransport.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public function send(Swift_Mime_Message $message, &$failedRecipients = null)
106 106
     {
107
-        $failedRecipients = (array)$failedRecipients;
107
+        $failedRecipients = (array) $failedRecipients;
108 108
 
109 109
         $evt = $this->_eventDispatcher->createSendEvent($this, $message);
110 110
         if ($evt) {
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
         }
117 117
 
118 118
         $count = (
119
-            count((array)$message->getTo())
120
-            + count((array)$message->getCc())
121
-            + count((array)$message->getBcc())
119
+            count((array) $message->getTo())
120
+            + count((array) $message->getCc())
121
+            + count((array) $message->getBcc())
122 122
         );
123 123
 
124 124
         /*
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
 
152 152
         // Separate headers from body
153 153
         if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) {
154
-            $headers = substr($messageStr, 0, $endHeaders) . "\r\n"; // Keep last EOL
154
+            $headers = substr($messageStr, 0, $endHeaders)."\r\n"; // Keep last EOL
155 155
             $body = substr($messageStr, $endHeaders + 4);
156 156
         } else {
157
-            $headers = $messageStr . "\r\n";
157
+            $headers = $messageStr."\r\n";
158 158
             $body = '';
159 159
         }
160 160
 
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
         } else {
182 182
             $failedRecipients = array_merge(
183 183
                 $failedRecipients,
184
-                array_keys((array)$message->getTo()),
185
-                array_keys((array)$message->getCc()),
186
-                array_keys((array)$message->getBcc())
184
+                array_keys((array) $message->getTo()),
185
+                array_keys((array) $message->getCc()),
186
+                array_keys((array) $message->getBcc())
187 187
             );
188 188
 
189 189
             if ($evt) {
Please login to merge, or discard this patch.
lib/classes/Swift/Transport/AbstractSmtpTransport.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     public function send(Swift_Mime_Message $message, &$failedRecipients = null)
178 178
     {
179 179
         $sent = 0;
180
-        $failedRecipients = (array)$failedRecipients;
180
+        $failedRecipients = (array) $failedRecipients;
181 181
 
182 182
         $evt = $this->_eventDispatcher->createSendEvent($this, $message);
183 183
         if ($evt) {
@@ -196,10 +196,10 @@  discard block
 block discarded – undo
196 196
             );
197 197
         }
198 198
 
199
-        $to = (array)$message->getTo();
200
-        $cc = (array)$message->getCc();
199
+        $to = (array) $message->getTo();
200
+        $cc = (array) $message->getCc();
201 201
         $tos = array_merge($to, $cc);
202
-        $bcc = (array)$message->getBcc();
202
+        $bcc = (array) $message->getBcc();
203 203
 
204 204
         $message->setBcc(array());
205 205
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function executeCommand($command, $codes = array(), &$failures = null)
310 310
     {
311
-        $failures = (array)$failures;
311
+        $failures = (array) $failures;
312 312
         $seq = $this->_buffer->write($command);
313 313
         $response = $this->_getFullResponse($seq);
314 314
 
@@ -461,8 +461,8 @@  discard block
 block discarded – undo
461 461
         if (!$valid) {
462 462
             $this->_throwException(
463 463
                 new Swift_TransportException(
464
-                    'Expected response code ' . implode('/', $wanted) . ' but got code ' .
465
-                    '"' . $code . '", with message "' . $response . '"',
464
+                    'Expected response code '.implode('/', $wanted).' but got code '.
465
+                    '"'.$code.'", with message "'.$response.'"',
466 466
                     $code
467 467
                 )
468 468
             );
Please login to merge, or discard this patch.