Completed
Branch master (518691)
by Lars
02:52
created
lib/classes/Swift.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
             return;
47 47
         }
48 48
 
49
-        $path = __DIR__ . '/' . str_replace('_', '/', $class) . '.php';
49
+        $path = __DIR__.'/'.str_replace('_', '/', $class).'.php';
50 50
 
51 51
         if (!file_exists($path)) {
52 52
             return;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@
 block discarded – undo
101 101
             return $staticStrtolowerCache[$string];
102 102
         }
103 103
 
104
-      $staticStrtolowerCache[$string] = strtolower($string);
104
+        $staticStrtolowerCache[$string] = strtolower($string);
105 105
 
106
-      return $staticStrtolowerCache[$string];
106
+        return $staticStrtolowerCache[$string];
107 107
     }
108 108
 }
Please login to merge, or discard this patch.
lib/classes/Swift/StreamFilters/StringReplacementFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             return false;
48 48
         }
49 49
 
50
-        foreach ((array)$this->_search as $needle) {
50
+        foreach ((array) $this->_search as $needle) {
51 51
             if (
52 52
                 $needle
53 53
                 &&
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/Headers/MailboxHeader.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
      *
203 203
      * @see getNameAddresses()
204 204
      *
205
-     * @return string[]
205
+     * @return integer[]
206 206
      */
207 207
     public function getAddresses()
208 208
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function setNameAddresses($mailboxes)
111 111
     {
112
-        $this->_mailboxes = $this->normalizeMailboxes((array)$mailboxes);
112
+        $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes);
113 113
         $this->setCachedValue(null); //Clear any cached value
114 114
     }
115 115
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function setAddresses($addresses)
196 196
     {
197
-        $this->setNameAddresses(array_values((array)$addresses));
197
+        $this->setNameAddresses(array_values((array) $addresses));
198 198
     }
199 199
 
200 200
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public function removeAddresses($addresses)
218 218
     {
219 219
         $this->setCachedValue(null);
220
-        foreach ((array)$addresses as $address) {
220
+        foreach ((array) $addresses as $address) {
221 221
             unset($this->_mailboxes[$address]);
222 222
         }
223 223
     }
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             $mailboxStr = $email;
338 338
             if ($name) {
339 339
                 $nameStr = $this->createDisplayNameString($name, 0 === \count($strings));
340
-                $mailboxStr = $nameStr . ' <' . $mailboxStr . '>';
340
+                $mailboxStr = $nameStr.' <'.$mailboxStr.'>';
341 341
             }
342 342
             $strings[] = $mailboxStr;
343 343
         }
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     private function _assertValidAddress($address)
356 356
     {
357 357
         if ($this->_emailValidator->isValidWrapper($address) === false) {
358
-            throw new Swift_RfcComplianceException('Address in mailbox given [' . $address . '] does not comply with RFC 2822, 3.6.2.');
358
+            throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.');
359 359
         }
360 360
     }
361 361
 }
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/Attachment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,6 +167,6 @@
 block discarded – undo
167 167
         }
168 168
         $extension = Swift::strtolowerWithStaticCache($extension);
169 169
 
170
-        return (string)$extension;
170
+        return (string) $extension;
171 171
     }
172 172
 }
Please login to merge, or discard this patch.
lib/classes/Swift/Transport/MailTransport.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
         $messageStr = $message->toString();
148 148
 
149 149
         if ($toHeader) {
150
-          $message->getHeaders()->set($toHeader);
150
+            $message->getHeaders()->set($toHeader);
151 151
         }
152 152
         $message->getHeaders()->set($subjectHeader);
153 153
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@
 block discarded – undo
262 262
      *
263 263
      * @param Swift_Mime_Message $message
264 264
      *
265
-     * @return mixed|null|string
265
+     * @return string|null
266 266
      */
267 267
     private function _getReversePath(Swift_Mime_Message $message)
268 268
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function send(Swift_Mime_Message $message, &$failedRecipients = null)
114 114
     {
115
-        $failedRecipients = (array)$failedRecipients;
115
+        $failedRecipients = (array) $failedRecipients;
116 116
 
117 117
         $evt = $this->_eventDispatcher->createSendEvent($this, $message);
118 118
         if ($evt) {
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
         }
125 125
 
126 126
         $count = (
127
-            \count((array)$message->getTo())
128
-            + \count((array)$message->getCc())
129
-            + \count((array)$message->getBcc())
127
+            \count((array) $message->getTo())
128
+            + \count((array) $message->getCc())
129
+            + \count((array) $message->getBcc())
130 130
         );
131 131
 
132 132
         /*
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 
162 162
         // Separate headers from body
163 163
         if (false !== $endHeaders = \strpos($messageStr, "\r\n\r\n")) {
164
-            $headers = \substr($messageStr, 0, $endHeaders) . "\r\n"; // Keep last EOL
164
+            $headers = \substr($messageStr, 0, $endHeaders)."\r\n"; // Keep last EOL
165 165
             $body = \substr($messageStr, $endHeaders + 4);
166 166
         } else {
167
-            $headers = $messageStr . "\r\n";
167
+            $headers = $messageStr."\r\n";
168 168
             $body = '';
169 169
         }
170 170
 
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
         } else {
194 194
             $failedRecipients = \array_merge(
195 195
                 $failedRecipients,
196
-                \array_keys((array)$message->getTo()),
197
-                \array_keys((array)$message->getCc()),
198
-                \array_keys((array)$message->getBcc())
196
+                \array_keys((array) $message->getTo()),
197
+                \array_keys((array) $message->getCc()),
198
+                \array_keys((array) $message->getBcc())
199 199
             );
200 200
 
201 201
             if ($evt) {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             $count = 0;
208 208
         }
209 209
 
210
-        $message->generateId();  // Make sure a new Message ID is used
210
+        $message->generateId(); // Make sure a new Message ID is used
211 211
 
212 212
         return $count;
213 213
     }
Please login to merge, or discard this patch.
lib/classes/Swift/Encoder/QpEncoder.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@
 block discarded – undo
260 260
             }
261 261
 
262 262
             if ($tmpRet !== '=00') {
263
-              $ret .= $tmpRet;
263
+                $ret .= $tmpRet;
264 264
             }
265 265
         }
266 266
 
Please login to merge, or discard this patch.
lib/classes/Swift/Signers/DomainKeySigner.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -520,6 +520,9 @@
 block discarded – undo
520 520
         $this->_hash = hash_final($this->_hashHandler, true);
521 521
     }
522 522
 
523
+    /**
524
+     * @param string $string
525
+     */
523 526
     private function _addToHash($string)
524 527
     {
525 528
         $this->_canonData .= $string;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $this->_privateKey = $privateKey;
147 147
         $this->_domainName = $domainName;
148
-        $this->_signerIdentity = '@' . $domainName;
148
+        $this->_signerIdentity = '@'.$domainName;
149 149
         $this->_selector = $selector;
150 150
     }
151 151
 
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         $params = array('a' => $this->_hashAlgorithm, 'b' => chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' '), 'c' => $this->_canon, 'd' => $this->_domainName, 'h' => implode(': ', $this->_signedHeaders), 'q' => 'dns', 's' => $this->_selector);
425 425
         $string = '';
426 426
         foreach ($params as $k => $v) {
427
-            $string .= $k . '=' . $v . '; ';
427
+            $string .= $k.'='.$v.'; ';
428 428
         }
429 429
         $string = trim($string);
430 430
         $headers->addTextHeader('DomainKey-Signature', $string);
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                 $name = Swift::strtolowerWithStaticCache(trim($exploded[0]));
447 447
                 $value = \str_replace("\r\n", '', $exploded[1]);
448 448
                 $value = \preg_replace("/[ \t][ \t]+/", ' ', $value);
449
-                $header = $name . ':' . trim($value) . "\r\n";
449
+                $header = $name.':'.trim($value)."\r\n";
450 450
             case 'simple':
451 451
                 // Nothing to do
452 452
         }
@@ -546,11 +546,11 @@  discard block
 block discarded – undo
546 546
         $signature = '';
547 547
         $pkeyId = openssl_get_privatekey($this->_privateKey);
548 548
         if (!$pkeyId) {
549
-            throw new Swift_SwiftException('Unable to load DomainKey Private Key [' . openssl_error_string() . ']');
549
+            throw new Swift_SwiftException('Unable to load DomainKey Private Key ['.openssl_error_string().']');
550 550
         }
551 551
         if (openssl_sign($this->_canonData, $signature, $pkeyId, OPENSSL_ALGO_SHA1)) {
552 552
             return $signature;
553 553
         }
554
-        throw new Swift_SwiftException('Unable to sign DomainKey Hash  [' . openssl_error_string() . ']');
554
+        throw new Swift_SwiftException('Unable to sign DomainKey Hash  ['.openssl_error_string().']');
555 555
     }
556 556
 }
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/SimpleMessage.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
             $address = array($address => $name);
159 159
         }
160 160
 
161
-        if (!$this->_setHeaderFieldModel('Sender', (array)$address)) {
162
-            $this->getHeaders()->addMailboxHeader('Sender', (array)$address);
161
+        if (!$this->_setHeaderFieldModel('Sender', (array) $address)) {
162
+            $this->getHeaders()->addMailboxHeader('Sender', (array) $address);
163 163
         }
164 164
 
165 165
         return $this;
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
             $addresses = array($addresses => $name);
213 213
         }
214 214
 
215
-        if (!$this->_setHeaderFieldModel('From', (array)$addresses)) {
216
-            $this->getHeaders()->addMailboxHeader('From', (array)$addresses);
215
+        if (!$this->_setHeaderFieldModel('From', (array) $addresses)) {
216
+            $this->getHeaders()->addMailboxHeader('From', (array) $addresses);
217 217
         }
218 218
 
219 219
         return $this;
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
             $addresses = array($addresses => $name);
267 267
         }
268 268
 
269
-        if (!$this->_setHeaderFieldModel('Reply-To', (array)$addresses)) {
270
-            $this->getHeaders()->addMailboxHeader('Reply-To', (array)$addresses);
269
+        if (!$this->_setHeaderFieldModel('Reply-To', (array) $addresses)) {
270
+            $this->getHeaders()->addMailboxHeader('Reply-To', (array) $addresses);
271 271
         }
272 272
 
273 273
         return $this;
@@ -321,8 +321,8 @@  discard block
 block discarded – undo
321 321
             $addresses = array($addresses => $name);
322 322
         }
323 323
 
324
-        if (!$this->_setHeaderFieldModel('To', (array)$addresses)) {
325
-            $this->getHeaders()->addMailboxHeader('To', (array)$addresses);
324
+        if (!$this->_setHeaderFieldModel('To', (array) $addresses)) {
325
+            $this->getHeaders()->addMailboxHeader('To', (array) $addresses);
326 326
         }
327 327
 
328 328
         return $this;
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
             $addresses = array($addresses => $name);
374 374
         }
375 375
 
376
-        if (!$this->_setHeaderFieldModel('Cc', (array)$addresses)) {
377
-            $this->getHeaders()->addMailboxHeader('Cc', (array)$addresses);
376
+        if (!$this->_setHeaderFieldModel('Cc', (array) $addresses)) {
377
+            $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses);
378 378
         }
379 379
 
380 380
         return $this;
@@ -425,8 +425,8 @@  discard block
 block discarded – undo
425 425
             $addresses = array($addresses => $name);
426 426
         }
427 427
 
428
-        if (!$this->_setHeaderFieldModel('Bcc', (array)$addresses)) {
429
-            $this->getHeaders()->addMailboxHeader('Bcc', (array)$addresses);
428
+        if (!$this->_setHeaderFieldModel('Bcc', (array) $addresses)) {
429
+            $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses);
430 430
         }
431 431
 
432 432
         return $this;
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
     {
565 565
         $this->attach($entity);
566 566
 
567
-        return 'cid:' . $entity->getId();
567
+        return 'cid:'.$entity->getId();
568 568
     }
569 569
 
570 570
     /**
Please login to merge, or discard this patch.
lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function setTimeout($timeout)
141 141
     {
142
-        $this->_timeout = (int)$timeout;
142
+        $this->_timeout = (int) $timeout;
143 143
 
144 144
         return $this;
145 145
     }
@@ -306,11 +306,11 @@  discard block
 block discarded – undo
306 306
         $host = $this->_host;
307 307
         switch (Swift::strtolowerWithStaticCache($this->_crypto)) {
308 308
             case 'ssl':
309
-                $host = 'ssl://' . $host;
309
+                $host = 'ssl://'.$host;
310 310
                 break;
311 311
 
312 312
             case 'tls':
313
-                $host = 'tls://' . $host;
313
+                $host = 'tls://'.$host;
314 314
                 break;
315 315
         }
316 316
 
Please login to merge, or discard this patch.