Completed
Push — 5.x ( 682e84...4331bf )
by Lars
03:25 queued 11s
created
lib/classes/Swift/Transport/MailTransport.php 1 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.
lib/classes/Swift/FileSpool.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
209 209
         $ret = '';
210 210
         $strlen = strlen($base);
211 211
         for ($i = 0; $i < $count; ++$i) {
212
-            $ret .= $base[(int)mt_rand(0, $strlen - 1)];
212
+            $ret .= $base[(int) mt_rand(0, $strlen - 1)];
213 213
         }
214 214
 
215 215
         return $ret;
Please login to merge, or discard this patch.