@@ -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(); |
|
99 | + $fileName = $this->_path.'/'.$this->getRandomString(); |
|
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; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $ret = ''; |
210 | 210 | $strlen = strlen($base) - 1; |
211 | 211 | for ($i = 0; $i < $count; ++$i) { |
212 | - $ret .= $base[(int)mt_rand(0, $strlen)]; |
|
212 | + $ret .= $base[(int) mt_rand(0, $strlen)]; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | return $ret; |