Completed
Push — 5.x ( cc95ce...6e4297 )
by Lars
10:47
created
lib/classes/Swift/KeyCache/ArrayKeyCache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
                 break;
68 68
             default:
69 69
                 throw new Swift_SwiftException(
70
-                    'Invalid mode [' . $mode . '] used to set nsKey=' .
71
-                    $nsKey . ', itemKey=' . $itemKey
70
+                    'Invalid mode ['.$mode.'] used to set nsKey='.
71
+                    $nsKey.', itemKey='.$itemKey
72 72
                 );
73 73
         }
74 74
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 break;
102 102
             default:
103 103
                 throw new Swift_SwiftException(
104
-                    'Invalid mode [' . $mode . '] used to set nsKey=' . $nsKey . ', itemKey=' . $itemKey
104
+                    'Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey
105 105
                 );
106 106
         }
107 107
     }
Please login to merge, or discard this patch.
lib/classes/Swift/KeyCache/DiskKeyCache.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
                 break;
96 96
             default:
97 97
                 throw new Swift_SwiftException(
98
-                    'Invalid mode [' . $mode . '] used to set nsKey=' .
99
-                    $nsKey . ', itemKey=' . $itemKey
98
+                    'Invalid mode ['.$mode.'] used to set nsKey='.
99
+                    $nsKey.', itemKey='.$itemKey
100 100
                     );
101 101
                 break;
102 102
         }
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
                 break;
130 130
             default:
131 131
                 throw new Swift_SwiftException(
132
-                    'Invalid mode [' . $mode . '] used to set nsKey=' .
133
-                    $nsKey . ', itemKey=' . $itemKey
132
+                    'Invalid mode ['.$mode.'] used to set nsKey='.
133
+                    $nsKey.', itemKey='.$itemKey
134 134
                     );
135 135
                 break;
136 136
         }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     public function hasKey($nsKey, $itemKey)
242 242
     {
243
-        return is_file($this->_path . '/' . $nsKey . '/' . $itemKey);
243
+        return is_file($this->_path.'/'.$nsKey.'/'.$itemKey);
244 244
     }
245 245
 
246 246
     /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     {
254 254
         if ($this->hasKey($nsKey, $itemKey)) {
255 255
             $this->_freeHandle($nsKey, $itemKey);
256
-            unlink($this->_path . '/' . $nsKey . '/' . $itemKey);
256
+            unlink($this->_path.'/'.$nsKey.'/'.$itemKey);
257 257
         }
258 258
     }
259 259
 
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
                 $this->clearKey($nsKey, $itemKey);
270 270
             }
271 271
 
272
-            if (is_dir($this->_path . '/' . $nsKey)) {
273
-                rmdir($this->_path . '/' . $nsKey);
272
+            if (is_dir($this->_path.'/'.$nsKey)) {
273
+                rmdir($this->_path.'/'.$nsKey);
274 274
             }
275 275
 
276 276
             unset($this->_keys[$nsKey]);
@@ -284,10 +284,10 @@  discard block
 block discarded – undo
284 284
      */
285 285
     private function _prepareCache($nsKey)
286 286
     {
287
-        $cacheDir = $this->_path . '/' . $nsKey;
287
+        $cacheDir = $this->_path.'/'.$nsKey;
288 288
         if (!is_dir($cacheDir)) {
289 289
             if (!mkdir($cacheDir)) {
290
-                throw new Swift_IoException('Failed to create cache directory ' . $cacheDir);
290
+                throw new Swift_IoException('Failed to create cache directory '.$cacheDir);
291 291
             }
292 292
             $this->_keys[$nsKey] = array();
293 293
         }
@@ -304,11 +304,11 @@  discard block
 block discarded – undo
304 304
      */
305 305
     private function _getHandle($nsKey, $itemKey, $position)
306 306
     {
307
-        $position = (int)$position;
307
+        $position = (int) $position;
308 308
 
309 309
         if (!isset($this->_keys[$nsKey][$itemKey])) {
310 310
             $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b';
311
-            $fp = fopen($this->_path . '/' . $nsKey . '/' . $itemKey, $openMode);
311
+            $fp = fopen($this->_path.'/'.$nsKey.'/'.$itemKey, $openMode);
312 312
             $this->_keys[$nsKey][$itemKey] = $fp;
313 313
         }
314 314
 
Please login to merge, or discard this patch.
lib/classes/Swift/DependencyContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
     {
117 117
         if (!$this->has($itemName)) {
118 118
             throw new Swift_DependencyException(
119
-                'Cannot lookup dependency "' . $itemName . '" since it is not registered.'
119
+                'Cannot lookup dependency "'.$itemName.'" since it is not registered.'
120 120
             );
121 121
         }
122 122
 
Please login to merge, or discard this patch.
lib/classes/Swift/Mailer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     public function createMessage($service = 'message')
55 55
     {
56
-        return Swift_DependencyContainer::getInstance()->lookup('message.' . $service);
56
+        return Swift_DependencyContainer::getInstance()->lookup('message.'.$service);
57 57
     }
58 58
 
59 59
     /**
Please login to merge, or discard this patch.
lib/classes/Swift.php 1 patch
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.
lib/swiftmailer_generate_mimes_config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
     ksort($valid_mime_types);
170 170
 
171 171
     // combine mime types and extensions array
172
-    $output = "$preamble\$swift_mime_types = array(\n    " . implode($valid_mime_types, ",\n    ") . "\n);";
172
+    $output = "$preamble\$swift_mime_types = array(\n    ".implode($valid_mime_types, ",\n    ")."\n);";
173 173
 
174 174
     // write mime_types.php config file
175 175
     @file_put_contents('./mime_types.php', $output);
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 (strtolower($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.
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/SimpleMimeEntity.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -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;
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
             if ($this->_cache->hasKey($this->_cacheKey, 'body')) {
540 540
                 $body = $this->_cache->getString($this->_cacheKey, 'body');
541 541
             } else {
542
-                $body = "\r\n" . $this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength());
542
+                $body = "\r\n".$this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength());
543 543
                 $this->_cache->setString($this->_cacheKey, 'body', $body, Swift_KeyCache::MODE_WRITE);
544 544
             }
545 545
             $string .= $body;
@@ -547,10 +547,10 @@  discard block
 block discarded – undo
547 547
 
548 548
         if (!empty($this->_immediateChildren)) {
549 549
             foreach ($this->_immediateChildren as $child) {
550
-                $string .= "\r\n\r\n--" . $this->getBoundary() . "\r\n";
550
+                $string .= "\r\n\r\n--".$this->getBoundary()."\r\n";
551 551
                 $string .= $child->toString();
552 552
             }
553
-            $string .= "\r\n\r\n--" . $this->getBoundary() . "--\r\n";
553
+            $string .= "\r\n\r\n--".$this->getBoundary()."--\r\n";
554 554
         }
555 555
 
556 556
         return $string;
@@ -617,10 +617,10 @@  discard block
 block discarded – undo
617 617
 
618 618
         if (!empty($this->_immediateChildren)) {
619 619
             foreach ($this->_immediateChildren as $child) {
620
-                $is->write("\r\n\r\n--" . $this->getBoundary() . "\r\n");
620
+                $is->write("\r\n\r\n--".$this->getBoundary()."\r\n");
621 621
                 $child->toByteStream($is);
622 622
             }
623
-            $is->write("\r\n\r\n--" . $this->getBoundary() . "--\r\n");
623
+            $is->write("\r\n\r\n--".$this->getBoundary()."--\r\n");
624 624
         }
625 625
     }
626 626
 
@@ -751,12 +751,12 @@  discard block
 block discarded – undo
751 751
     {
752 752
         $idLeft = $this->_generateNewCacheKey();
753 753
         $idRight = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated';
754
-        $id = $idLeft . '@' . $idRight;
754
+        $id = $idLeft.'@'.$idRight;
755 755
 
756 756
         try {
757 757
             $this->_assertValidId($id);
758 758
         } catch (Swift_RfcComplianceException $e) {
759
-            $id = $idLeft . '@swift.generated';
759
+            $id = $idLeft.'@swift.generated';
760 760
         }
761 761
 
762 762
         return $id;
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      */
770 770
     private function _generateNewCacheKey()
771 771
     {
772
-        return md5(getmypid() . '.' . time() . '.' . uniqid(mt_rand(), true));
772
+        return md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true));
773 773
     }
774 774
 
775 775
     private function _readStream(Swift_OutputByteStream $os)
@@ -852,10 +852,10 @@  discard block
 block discarded – undo
852 852
         $lowercaseType = Swift::strtolowerWithStaticCache($child->getContentType());
853 853
 
854 854
         if (isset($filter[$realLevel]) && isset($filter[$realLevel][$lowercaseType])) {
855
-            return (int)$filter[$realLevel][$lowercaseType];
855
+            return (int) $filter[$realLevel][$lowercaseType];
856 856
         }
857 857
 
858
-        return (int)$realLevel;
858
+        return (int) $realLevel;
859 859
     }
860 860
 
861 861
     /**
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
     private function _assertValidId($id)
950 950
     {
951 951
         if ($this->_emailValidator->isValidWrapper($id) === false) {
952
-            throw new Swift_RfcComplianceException('Invalid ID given <' . $id . '>');
952
+            throw new Swift_RfcComplianceException('Invalid ID given <'.$id.'>');
953 953
         }
954 954
     }
955 955
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -641,7 +641,7 @@
 block discarded – undo
641 641
      *
642 642
      * @param string $field
643 643
      *
644
-     * @return null|string[]|string
644
+     * @return string
645 645
      */
646 646
     protected function _getHeaderFieldModel($field)
647 647
     {
Please login to merge, or discard this patch.