Completed
Pull Request — master (#9)
by Jacob
02:54
created
src/Archangel.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -273,14 +273,14 @@  discard block
 block discarded – undo
273 273
     {
274 274
       $message = '';
275 275
       
276
-      if(isset($this->attachments) && count($this->attachments) > 0)
276
+      if (isset($this->attachments) && count($this->attachments) > 0)
277 277
         $message .= "--{$this->getBoundary()}" . self::LINE_BREAK;
278 278
       
279
-      if(
279
+      if (
280 280
         isset($this->plainMessage) && strlen($this->plainMessage) > 0 &&
281 281
         isset($this->htmlMessage) && strlen($this->htmlMessage) > 0)
282 282
       {
283
-        if(isset($this->attachments) && count($this->attachments) > 0)
283
+        if (isset($this->attachments) && count($this->attachments) > 0)
284 284
         {
285 285
           $message .= "Content-Type: multipart/alternative; boundary={$this->getAlternativeBoundary()}" . self::LINE_BREAK;
286 286
           $message .= self::LINE_BREAK;
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
         $message .= "--{$this->getAlternativeBoundary()}--" . self::LINE_BREAK;
301 301
         $message .= self::LINE_BREAK;
302 302
       }
303
-      else if(isset($this->plainMessage) && strlen($this->plainMessage))
303
+      else if (isset($this->plainMessage) && strlen($this->plainMessage))
304 304
       {
305
-        if(isset($this->attachments) && count($this->attachments) > 0)
305
+        if (isset($this->attachments) && count($this->attachments) > 0)
306 306
         {
307 307
           $message .= 'Content-Type: text/plain; charset="iso-8859"' . self::LINE_BREAK;
308 308
           $message .= 'Content-Transfer-Encoding: 7bit' . self::LINE_BREAK;
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
         $message .= $this->plainMessage;
312 312
         $message .= self::LINE_BREAK;
313 313
       }
314
-      else if(isset($this->htmlMessage) && strlen($this->htmlMessage))
314
+      else if (isset($this->htmlMessage) && strlen($this->htmlMessage))
315 315
       {
316
-        if(isset($this->attachments) && count($this->attachments) > 0)
316
+        if (isset($this->attachments) && count($this->attachments) > 0)
317 317
         {
318 318
           $message .= 'Content-Type: text/html; charset="iso-8859-1"' . self::LINE_BREAK;
319 319
           $message .= 'Content-Transfer-Encoding: 7bit' . self::LINE_BREAK;
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
         $message .= $this->htmlMessage;
323 323
         $message .= self::LINE_BREAK;
324 324
       }
325
-      if(isset($this->attachments) && count($this->attachments) > 0)
325
+      if (isset($this->attachments) && count($this->attachments) > 0)
326 326
       {
327
-        foreach($this->attachments as $attachment)
327
+        foreach ($this->attachments as $attachment)
328 328
         {
329 329
           $message .= "--{$this->getBoundary()}" . self::LINE_BREAK;
330 330
           $message .= "Content-Type: {$attachment['type']}; name=\"{$attachment['title']}\"" . self::LINE_BREAK;
@@ -375,25 +375,25 @@  discard block
 block discarded – undo
375 375
     protected function buildHeaders()
376 376
     {
377 377
       $headers = '';
378
-      foreach($this->headers as $key => $value)
378
+      foreach ($this->headers as $key => $value)
379 379
       {
380 380
         $headers .= "{$key}: {$value}" . self::LINE_BREAK;
381 381
       }
382 382
       
383
-      if(count($this->cc) > 0)
383
+      if (count($this->cc) > 0)
384 384
         $headers .= 'CC: ' . implode(', ', $this->cc) . self::LINE_BREAK;
385
-      if(count($this->bcc) > 0)
385
+      if (count($this->bcc) > 0)
386 386
         $headers .= 'BCC: ' . implode(', ', $this->bcc) . self::LINE_BREAK;
387 387
       
388
-      if(isset($this->attachments) && count($this->attachments) > 0)
388
+      if (isset($this->attachments) && count($this->attachments) > 0)
389 389
         $headers .= "Content-Type: multipart/mixed; boundary=\"{$this->getBoundary()}\"";
390
-      else if(
390
+      else if (
391 391
         isset($this->plainMessage) && strlen($this->plainMessage) > 0 &&
392 392
         isset($this->htmlMessage) && strlen($this->htmlMessage) > 0)
393 393
       {
394 394
         $headers .= "Content-Type: multipart/alternative; boundary=\"{$this->getAlternativeBoundary()}\"";
395 395
       }
396
-      else if(isset($this->htmlMessage) && strlen($this->htmlMessage) > 0)
396
+      else if (isset($this->htmlMessage) && strlen($this->htmlMessage) > 0)
397 397
         $headers .= 'Content-type: text/html; charset="iso-8859-1"';
398 398
       
399 399
       return $headers;
Please login to merge, or discard this patch.