Completed
Pull Request — 5.x (#28)
by Lars
15:40 queued 04:17
created
lib/classes/Swift/CharacterStream/NgCharacterStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
                 $to = $start;
199 199
                 for (; $this->_currentPos < $end; ++$this->_currentPos) {
200 200
                     if (isset($this->_map['i'][$this->_currentPos])) {
201
-                        $ret .= substr($this->_datas, $start, $to - $start) . '?';
201
+                        $ret .= substr($this->_datas, $start, $to - $start).'?';
202 202
                         $start = $this->_map['p'][$this->_currentPos];
203 203
                     } else {
204 204
                         $to = $this->_map['p'][$this->_currentPos];
Please login to merge, or discard this patch.
lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,23 +51,23 @@  discard block
 block discarded – undo
51 51
         $prefix = 'Swift_CharacterReader_';
52 52
 
53 53
         $singleByte = array(
54
-            'class' => $prefix . 'GenericFixedWidthReader',
54
+            'class' => $prefix.'GenericFixedWidthReader',
55 55
             'constructor' => array(1),
56 56
             );
57 57
 
58 58
         $doubleByte = array(
59
-            'class' => $prefix . 'GenericFixedWidthReader',
59
+            'class' => $prefix.'GenericFixedWidthReader',
60 60
             'constructor' => array(2),
61 61
             );
62 62
 
63 63
         $fourBytes = array(
64
-            'class' => $prefix . 'GenericFixedWidthReader',
64
+            'class' => $prefix.'GenericFixedWidthReader',
65 65
             'constructor' => array(4),
66 66
             );
67 67
 
68 68
         // Utf-8
69 69
         self::$_map['utf-?8'] = array(
70
-            'class' => $prefix . 'Utf8Reader',
70
+            'class' => $prefix.'Utf8Reader',
71 71
             'constructor' => array(),
72 72
             );
73 73
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $charset = trim(strtolower($charset));
107 107
         foreach (self::$_map as $pattern => $spec) {
108
-            $re = '/^' . $pattern . '$/D';
108
+            $re = '/^'.$pattern.'$/D';
109 109
             if (preg_match($re, $charset)) {
110 110
                 if (!array_key_exists($pattern, self::$_loaded)) {
111 111
                     $reflector = new ReflectionClass($spec['class']);
Please login to merge, or discard this patch.
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/Transport/MailTransport.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -286,10 +286,10 @@
 block discarded – undo
286 286
     /**
287 287
      * Return php mail extra params to use for invoker->mail.
288 288
      *
289
-     * @param $extraParams
289
+     * @param string $extraParams
290 290
      * @param $reversePath
291 291
      *
292
-     * @return mixed string|null
292
+     * @return string|null string|null
293 293
      */
294 294
     private function _formatExtraParams($extraParams, $reversePath)
295 295
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function send(Swift_Mime_Message $message, &$failedRecipients = null)
132 132
     {
133
-        $failedRecipients = (array)$failedRecipients;
133
+        $failedRecipients = (array) $failedRecipients;
134 134
 
135 135
         $evt = $this->_eventDispatcher->createSendEvent($this, $message);
136 136
         if ($evt) {
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         $count = (
145
-            count((array)$message->getTo())
146
-            + count((array)$message->getCc())
147
-            + count((array)$message->getBcc())
145
+            count((array) $message->getTo())
146
+            + count((array) $message->getCc())
147
+            + count((array) $message->getBcc())
148 148
         );
149 149
 
150 150
         /*
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 
178 178
         // Separate headers from body
179 179
         if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) {
180
-            $headers = substr($messageStr, 0, $endHeaders) . "\r\n"; // Keep last EOL
180
+            $headers = substr($messageStr, 0, $endHeaders)."\r\n"; // Keep last EOL
181 181
             $body = substr($messageStr, $endHeaders + 4);
182 182
         } else {
183
-            $headers = $messageStr . "\r\n";
183
+            $headers = $messageStr."\r\n";
184 184
             $body = '';
185 185
         }
186 186
 
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
         } else {
208 208
             $failedRecipients = array_merge(
209 209
                 $failedRecipients,
210
-                array_keys((array)$message->getTo()),
211
-                array_keys((array)$message->getCc()),
212
-                array_keys((array)$message->getBcc())
210
+                array_keys((array) $message->getTo()),
211
+                array_keys((array) $message->getCc()),
212
+                array_keys((array) $message->getBcc())
213 213
             );
214 214
 
215 215
             if ($evt) {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             $count = 0;
222 222
         }
223 223
 
224
-        $message->generateId();  // Make sure a new Message ID is used
224
+        $message->generateId(); // Make sure a new Message ID is used
225 225
 
226 226
         return $count;
227 227
     }
Please login to merge, or discard this patch.
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.