Completed
Push — 5.x ( 9e9821...6eaf70 )
by Lars
07:34
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/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/Headers/DateHeader.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      *
71 71
      * This method returns a UNIX timestamp.
72 72
      *
73
-     * @return mixed
73
+     * @return integer|null
74 74
      */
75 75
     public function getFieldBodyModel()
76 76
     {
Please login to merge, or discard this patch.
lib/classes/Swift/Mime/Headers/ParameterizedHeader.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         foreach ($this->_params as $name => $value) {
133 133
             if (null !== $value) {
134 134
                 // Add the parameter
135
-                $body .= '; ' . $this->_createParameter($name, $value);
135
+                $body .= '; '.$this->_createParameter($name, $value);
136 136
             }
137 137
         }
138 138
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 $tokens[count($tokens) - 1] .= ';';
161 161
                 $tokens = array_merge(
162 162
                     $tokens,
163
-                    $this->generateTokenLines(' ' . $this->_createParameter($name, $value))
163
+                    $this->generateTokenLines(' '.$this->_createParameter($name, $value))
164 164
                 );
165 165
             }
166 166
         }
@@ -182,19 +182,19 @@  discard block
 block discarded – undo
182 182
 
183 183
         $encoded = false;
184 184
         // Allow room for parameter name, indices, "=" and DQUOTEs
185
-        $maxValueLength = $this->getMaxLineLength() - strlen($name . '=*N"";') - 1;
185
+        $maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1;
186 186
         $firstLineOffset = 0;
187 187
 
188 188
         // If it's not already a valid parameter value ...
189
-        if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) {
189
+        if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {
190 190
             // TODO: text, or something else??
191 191
             // ... and it's not ascii
192 192
             if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) {
193 193
                 $encoded = true;
194 194
 
195 195
                 // Allow space for the indices, charset and language.
196
-                $maxValueLength = $this->getMaxLineLength() - strlen($name . '*N*="";') - 1;
197
-                $firstLineOffset = strlen($this->getCharset() . "'" . $this->getLanguage() . "'");
196
+                $maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1;
197
+                $firstLineOffset = strlen($this->getCharset()."'".$this->getLanguage()."'");
198 198
             }
199 199
         }
200 200
 
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
         if (count($valueLines) > 1) {
225 225
             $paramLines = array();
226 226
             foreach ($valueLines as $i => $line) {
227
-                $paramLines[] = $name . '*' . $i . $this->_getEndOfParameterValue($line, true, $i === 0);
227
+                $paramLines[] = $name.'*'.$i.$this->_getEndOfParameterValue($line, true, $i === 0);
228 228
             }
229 229
 
230 230
             return implode(";\r\n ", $paramLines);
231 231
         }
232 232
 
233
-        return $name . $this->_getEndOfParameterValue(
233
+        return $name.$this->_getEndOfParameterValue(
234 234
             $valueLines[0],
235 235
             $encoded,
236 236
             true
@@ -248,18 +248,18 @@  discard block
 block discarded – undo
248 248
      */
249 249
     private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false)
250 250
     {
251
-        if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) {
252
-            $value = '"' . $value . '"';
251
+        if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {
252
+            $value = '"'.$value.'"';
253 253
         }
254 254
 
255 255
         $prepend = '=';
256 256
         if ($encoded) {
257 257
             $prepend = '*=';
258 258
             if ($firstLine) {
259
-                $prepend = '*=' . $this->getCharset() . "'" . $this->getLanguage() . "'";
259
+                $prepend = '*='.$this->getCharset()."'".$this->getLanguage()."'";
260 260
             }
261 261
         }
262 262
 
263
-        return $prepend . $value;
263
+        return $prepend.$value;
264 264
     }
265 265
 }
Please login to merge, or discard this patch.