@@ -95,8 +95,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | if (!$pointer) { |
180 | 180 | throw new Swift_IoException( |
181 | - 'Unable to open file for reading [' . $this->_path . ']' |
|
181 | + 'Unable to open file for reading ['.$this->_path.']' |
|
182 | 182 | ); |
183 | 183 | } |
184 | 184 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | |
202 | 202 | if (!$pointer) { |
203 | 203 | throw new Swift_IoException( |
204 | - 'Unable to open file for writing [' . $this->_path . ']' |
|
204 | + 'Unable to open file for writing ['.$this->_path.']' |
|
205 | 205 | ); |
206 | 206 | } |
207 | 207 | |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | $source = fopen($this->_path, 'rb'); |
272 | 272 | if (!$source) { |
273 | - throw new Swift_IoException('Unable to open file for copying [' . $this->_path . ']'); |
|
273 | + throw new Swift_IoException('Unable to open file for copying ['.$this->_path.']'); |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | fseek($tmpFile, 0, SEEK_SET); |
@@ -116,7 +116,7 @@ |
||
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 |
@@ -53,7 +53,7 @@ |
||
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 | /** |
@@ -46,7 +46,7 @@ |
||
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; |
@@ -169,7 +169,7 @@ |
||
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); |