@@ -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); |
@@ -96,10 +96,10 @@ discard block |
||
96 | 96 | public function queueMessage(Swift_Mime_Message $message) |
97 | 97 | { |
98 | 98 | $ser = serialize($message); |
99 | - $fileName = $this->_path . '/' . $this->getRandomString(10); |
|
99 | + $fileName = $this->_path.'/'.$this->getRandomString(10); |
|
100 | 100 | for ($i = 0; $i < $this->_retryLimit; ++$i) { |
101 | 101 | /* We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism */ |
102 | - $fp = @fopen($fileName . '.message', 'x'); |
|
102 | + $fp = @fopen($fileName.'.message', 'x'); |
|
103 | 103 | if (false !== $fp) { |
104 | 104 | if (false === fwrite($fp, $ser)) { |
105 | 105 | return false; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | - $failedRecipients = (array)$failedRecipients; |
|
159 | + $failedRecipients = (array) $failedRecipients; |
|
160 | 160 | $count = 0; |
161 | 161 | $time = time(); |
162 | 162 | foreach ($directoryIterator as $file) { |
@@ -167,12 +167,12 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | /* We try a rename, it's an atomic operation, and avoid locking the file */ |
170 | - if (rename($file, $file . '.sending')) { |
|
171 | - $message = unserialize(file_get_contents($file . '.sending')); |
|
170 | + if (rename($file, $file.'.sending')) { |
|
171 | + $message = unserialize(file_get_contents($file.'.sending')); |
|
172 | 172 | |
173 | 173 | $count += $transport->send($message, $failedRecipients); |
174 | 174 | |
175 | - unlink($file . '.sending'); |
|
175 | + unlink($file.'.sending'); |
|
176 | 176 | } else { |
177 | 177 | /* This message has just been catched by another process */ |
178 | 178 | continue; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $ret = ''; |
205 | 205 | $strlen = strlen($base); |
206 | 206 | for ($i = 0; $i < $count; ++$i) { |
207 | - $ret .= $base[((int)mt_rand(0, $strlen - 1))]; |
|
207 | + $ret .= $base[((int) mt_rand(0, $strlen - 1))]; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | return $ret; |