Completed
Push — master ( 0301f4...7f3b53 )
by Lars
02:47
created
examples/callback_csv.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
     $remove = $displayData['remove'];
37 37
     $removeraw = $displayData['removestat'];
38 38
 
39
-    $msg = $msgnum . ',' . $currentTime . ',' . $ruleNo . ',' . $ruleCat . ',' . $bounceType . ',' . $removeraw . ',' . $email . ',' . $subject;
39
+    $msg = $msgnum.','.$currentTime.','.$ruleNo.','.$ruleCat.','.$bounceType.','.$removeraw.','.$email.','.$subject;
40 40
 
41
-    $filename = 'logs/bouncelog_' . \date('m') . \date('Y') . '.csv';
41
+    $filename = 'logs/bouncelog_'.\date('m').\date('Y').'.csv';
42 42
     if (!\file_exists($filename)) {
43
-        $tmsg = 'Msg#,Current Time,Rule Number,Rule Category,Bounce Type,Status,Email,Subject' . "\n" . $msg;
43
+        $tmsg = 'Msg#,Current Time,Rule Number,Rule Category,Bounce Type,Status,Email,Subject'."\n".$msg;
44 44
     } else {
45 45
         $fileContents = \file_get_contents($filename);
46 46
 
47
-        if (\stripos($fileContents, "\n" . $msgnum . ',') !== false) {
47
+        if (\stripos($fileContents, "\n".$msgnum.',') !== false) {
48 48
             $doPutFile = false;
49 49
         }
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     $handle = \fopen($filename, 'ab');
55 55
     if ($handle) {
56
-        if (\fwrite($handle, $tmsg . "\n") === false) {
56
+        if (\fwrite($handle, $tmsg."\n") === false) {
57 57
             echo 'Cannot write message<br />';
58 58
         }
59 59
         \fclose($handle);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         echo 'Cannot open file to append<br />';
62 62
     }
63 63
 
64
-    echo $msgnum . ': ' . $ruleNo . ' | ' . $ruleCat . ' | ' . $bounceType . ' | ' . $remove . ' | ' . $email . ' | ' . $subject . "<br />\n";
64
+    echo $msgnum.': '.$ruleNo.' | '.$ruleCat.' | '.$bounceType.' | '.$remove.' | '.$email.' | '.$subject."<br />\n";
65 65
 
66 66
     return true;
67 67
 }
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
     // change the remove flag from true or 1 to textual representation
110 110
     if (\stripos($remove, 'moved') !== false && \stripos($remove, 'hard') !== false) {
111 111
         $data['removestat'] = 'moved (hard)';
112
-        $data['remove'] = '<span style="color:red;">' . 'moved (hard)' . '</span>';
112
+        $data['remove'] = '<span style="color:red;">'.'moved (hard)'.'</span>';
113 113
     } elseif (\stripos($remove, 'moved') !== false && \stripos($remove, 'soft') !== false) {
114 114
         $data['removestat'] = 'moved (soft)';
115
-        $data['remove'] = '<span style="color:gray;">' . 'moved (soft)' . '</span>';
115
+        $data['remove'] = '<span style="color:gray;">'.'moved (soft)'.'</span>';
116 116
     } elseif ($remove == true || $remove == '1') {
117 117
         $data['removestat'] = 'deleted';
118
-        $data['remove'] = '<span style="color:red;">' . 'deleted' . '</span>';
118
+        $data['remove'] = '<span style="color:red;">'.'deleted'.'</span>';
119 119
     } else {
120 120
         $data['removestat'] = 'not deleted';
121
-        $data['remove'] = '<span style="color:gray;">' . 'not deleted' . '</span>';
121
+        $data['remove'] = '<span style="color:gray;">'.'not deleted'.'</span>';
122 122
     }
123 123
 
124 124
     return $data;
Please login to merge, or discard this patch.
examples/callback_echo.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     $emailName = $displayData['emailName'];
33 33
     $emailAddy = $displayData['emailAddy'];
34 34
     $remove = $displayData['remove'];
35
-    echo $msgnum . ': ' . $ruleNo . ' | ' . $ruleCat . ' | ' . $bounceType . ' | ' . $remove . ' | ' . $email . ' | ' . $subject . "<br />\n";
35
+    echo $msgnum.': '.$ruleNo.' | '.$ruleCat.' | '.$bounceType.' | '.$remove.' | '.$email.' | '.$subject."<br />\n";
36 36
 
37 37
     return true;
38 38
 }
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
     // change the remove flag from true or 1 to textual representation
81 81
     if (\stripos($remove, 'moved') !== false && \stripos($remove, 'hard') !== false) {
82 82
         $data['removestat'] = 'moved (hard)';
83
-        $data['remove'] = '<span style="color:red;">' . 'moved (hard)' . '</span>';
83
+        $data['remove'] = '<span style="color:red;">'.'moved (hard)'.'</span>';
84 84
     } elseif (\stripos($remove, 'moved') !== false && \stripos($remove, 'soft') !== false) {
85 85
         $data['removestat'] = 'moved (soft)';
86
-        $data['remove'] = '<span style="color:gray;">' . 'moved (soft)' . '</span>';
86
+        $data['remove'] = '<span style="color:gray;">'.'moved (soft)'.'</span>';
87 87
     } elseif ($remove == true || $remove == '1') {
88 88
         $data['removestat'] = 'deleted';
89
-        $data['remove'] = '<span style="color:red;">' . 'deleted' . '</span>';
89
+        $data['remove'] = '<span style="color:red;">'.'deleted'.'</span>';
90 90
     } else {
91 91
         $data['removestat'] = 'not deleted';
92
-        $data['remove'] = '<span style="color:gray;">' . 'not deleted' . '</span>';
92
+        $data['remove'] = '<span style="color:gray;">'.'not deleted'.'</span>';
93 93
     }
94 94
 
95 95
     return $data;
Please login to merge, or discard this patch.
examples/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 echo '<hr style="width:200px;" />';
86 86
 $time_end = microtime_float();
87 87
 $time = $time_end - $time_start;
88
-echo 'Seconds to process: ' . $time . '<br />';
88
+echo 'Seconds to process: '.$time.'<br />';
89 89
 
90 90
 /**
91 91
  * @return float
@@ -94,5 +94,5 @@  discard block
 block discarded – undo
94 94
 {
95 95
     list($usec, $sec) = \explode(' ', \microtime());
96 96
 
97
-    return (float) $usec + (float) $sec;
97
+    return (float)$usec + (float)$sec;
98 98
 }
Please login to merge, or discard this patch.
examples/callback_database.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     $emailAddy = $displayData['emailAddy'];
51 51
     $remove = $displayData['remove'];
52 52
 
53
-    echo $msgnum . ': ' . $ruleNo . ' | ' . $ruleCat . ' | ' . $bounceType . ' | ' . $remove . ' | ' . $email . ' | ' . $subject . "<br />\n";
53
+    echo $msgnum.': '.$ruleNo.' | '.$ruleCat.' | '.$bounceType.' | '.$remove.' | '.$email.' | '.$subject."<br />\n";
54 54
 
55 55
     return true;
56 56
 }
@@ -97,16 +97,16 @@  discard block
 block discarded – undo
97 97
     // change the remove flag from true or 1 to textual representation
98 98
     if (\stripos($remove, 'moved') !== false && \stripos($remove, 'hard') !== false) {
99 99
         $data['removestat'] = 'moved (hard)';
100
-        $data['remove'] = '<span style="color:red;">' . 'moved (hard)' . '</span>';
100
+        $data['remove'] = '<span style="color:red;">'.'moved (hard)'.'</span>';
101 101
     } elseif (\stripos($remove, 'moved') !== false && \stripos($remove, 'soft') !== false) {
102 102
         $data['removestat'] = 'moved (soft)';
103
-        $data['remove'] = '<span style="color:gray;">' . 'moved (soft)' . '</span>';
103
+        $data['remove'] = '<span style="color:gray;">'.'moved (soft)'.'</span>';
104 104
     } elseif ($remove == true || $remove == '1') {
105 105
         $data['removestat'] = 'deleted';
106
-        $data['remove'] = '<span style="color:red;">' . 'deleted' . '</span>';
106
+        $data['remove'] = '<span style="color:red;">'.'deleted'.'</span>';
107 107
     } else {
108 108
         $data['removestat'] = 'not deleted';
109
-        $data['remove'] = '<span style="color:gray;">' . 'not deleted' . '</span>';
109
+        $data['remove'] = '<span style="color:gray;">'.'not deleted'.'</span>';
110 110
     }
111 111
 
112 112
     return $data;
Please login to merge, or discard this patch.
src/BounceMailHandler/BounceMailHandler.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 namespace BounceMailHandler;
14 14
 
15
-require_once __DIR__ . '/phpmailer-bmh_rules.php';
15
+require_once __DIR__.'/phpmailer-bmh_rules.php';
16 16
 
17 17
 /**
18 18
  * BounceMailHandler class
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     {
313 313
         // before starting the processing, let's check the delete flag and do global deletes if true
314 314
         if (\trim($this->deleteMsgDate) != '') {
315
-            echo 'processing global delete based on date of ' . $this->deleteMsgDate . '<br />';
315
+            echo 'processing global delete based on date of '.$this->deleteMsgDate.'<br />';
316 316
             $this->globalDelete();
317 317
         }
318 318
 
@@ -322,24 +322,24 @@  discard block
 block discarded – undo
322 322
             $this->moveHard = false;
323 323
         }
324 324
 
325
-        $port = $this->port . '/' . $this->service . '/' . $this->serviceOption;
325
+        $port = $this->port.'/'.$this->service.'/'.$this->serviceOption;
326 326
 
327 327
         \set_time_limit(self::SECONDS_TIMEOUT);
328 328
 
329 329
         if (!$this->testMode) {
330
-            $this->mailboxLink = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, \CL_EXPUNGE | ($this->testMode ? \OP_READONLY : 0));
330
+            $this->mailboxLink = \imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, \CL_EXPUNGE | ($this->testMode ? \OP_READONLY : 0));
331 331
         } else {
332
-            $this->mailboxLink = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? \OP_READONLY : 0));
332
+            $this->mailboxLink = \imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? \OP_READONLY : 0));
333 333
         }
334 334
 
335 335
         if (!$this->mailboxLink) {
336
-            $this->errorMessage = 'Cannot create ' . $this->service . ' connection to ' . $this->mailhost . $this->bmhNewLine . 'Error MSG: ' . \imap_last_error();
336
+            $this->errorMessage = 'Cannot create '.$this->service.' connection to '.$this->mailhost.$this->bmhNewLine.'Error MSG: '.\imap_last_error();
337 337
             $this->output();
338 338
 
339 339
             return false;
340 340
         }
341 341
 
342
-        $this->output('Connected to: ' . $this->mailhost . ' (' . $this->mailboxUserName . ')');
342
+        $this->output('Connected to: '.$this->mailhost.' ('.$this->mailboxUserName.')');
343 343
 
344 344
         return true;
345 345
     }
@@ -354,14 +354,14 @@  discard block
 block discarded – undo
354 354
         $dateArr = \explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd
355 355
         $delDate = \mktime(0, 0, 0, $dateArr[1], $dateArr[2], $dateArr[0]);
356 356
 
357
-        $port = $this->port . '/' . $this->service . '/' . $this->serviceOption;
358
-        $mboxt = \imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, \OP_HALFOPEN);
357
+        $port = $this->port.'/'.$this->service.'/'.$this->serviceOption;
358
+        $mboxt = \imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, \OP_HALFOPEN);
359 359
 
360 360
         if ($mboxt === false) {
361 361
             return false;
362 362
         }
363 363
 
364
-        $list = \imap_getmailboxes($mboxt, '{' . $this->mailhost . ':' . $port . '}', '*');
364
+        $list = \imap_getmailboxes($mboxt, '{'.$this->mailhost.':'.$port.'}', '*');
365 365
 
366 366
         if (\is_array($list)) {
367 367
             foreach ($list as $key => $val) {
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 $nameRaw = $nameArr[\count($nameArr) - 1];
371 371
 
372 372
                 if (\stripos($nameRaw, 'sent') === false) {
373
-                    $mboxd = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $nameRaw, $this->mailboxUserName, $this->mailboxPassword, \CL_EXPUNGE);
373
+                    $mboxd = \imap_open('{'.$this->mailhost.':'.$port.'}'.$nameRaw, $this->mailboxUserName, $this->mailboxPassword, \CL_EXPUNGE);
374 374
                     $messages = \imap_sort($mboxd, \SORTDATE, 0);
375 375
                     $i = 0;
376 376
 
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
     {
410 410
         if ($this->verbose >= $verboseLevel) {
411 411
             if ($msg) {
412
-                echo $msg . $this->bmhNewLine;
412
+                echo $msg.$this->bmhNewLine;
413 413
             } else {
414
-                echo $this->errorMessage . $this->bmhNewLine;
414
+                echo $this->errorMessage.$this->bmhNewLine;
415 415
             }
416 416
         }
417 417
     }
@@ -434,13 +434,13 @@  discard block
 block discarded – undo
434 434
         }
435 435
 
436 436
         if (!$this->mailboxLink) {
437
-            $this->errorMessage = 'Cannot open the mailbox file to ' . $filePath . $this->bmhNewLine . 'Error MSG: ' . \imap_last_error();
437
+            $this->errorMessage = 'Cannot open the mailbox file to '.$filePath.$this->bmhNewLine.'Error MSG: '.\imap_last_error();
438 438
             $this->output();
439 439
 
440 440
             return false;
441 441
         }
442 442
 
443
-        $this->output('Opened ' . $filePath);
443
+        $this->output('Opened '.$filePath);
444 444
 
445 445
         return true;
446 446
     }
@@ -481,12 +481,12 @@  discard block
 block discarded – undo
481 481
         $unprocessedCount = 0;
482 482
         $deletedCount = 0;
483 483
         $movedCount = 0;
484
-        $this->output('Total: ' . $totalCount . ' messages ');
484
+        $this->output('Total: '.$totalCount.' messages ');
485 485
 
486 486
         // process maximum number of messages
487 487
         if ($fetchedCount > $this->maxMessages) {
488 488
             $fetchedCount = $this->maxMessages;
489
-            $this->output('Processing first ' . $fetchedCount . ' messages ');
489
+            $this->output('Processing first '.$fetchedCount.' messages ');
490 490
         }
491 491
 
492 492
         if ($this->testMode) {
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
                     $processedResult = $this->processBounce($x, 'DSN', $totalCount);
529 529
                 } else {
530 530
                     // not standard DSN msg
531
-                    $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT);
531
+                    $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT);
532 532
 
533 533
                     if ($this->debugBodyRule) {
534 534
                         if ($structure->ifdescription) {
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                         $processedResult = $this->processBounce($x, 'DSN', $totalCount);
555 555
                     } else {
556 556
                         // not standard DSN msg
557
-                        $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT);
557
+                        $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT);
558 558
 
559 559
                         if ($this->debugBodyRule) {
560 560
                             $this->output("  Content-Type : {$match[1]}", self::VERBOSE_DEBUG);
@@ -564,10 +564,10 @@  discard block
 block discarded – undo
564 564
                     }
565 565
                 } else {
566 566
                     // didn't get content-type header
567
-                    $this->output('Msg #' . $x . ' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT);
567
+                    $this->output('Msg #'.$x.' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT);
568 568
 
569 569
                     if ($this->debugBodyRule) {
570
-                        $this->output('  Headers: ' . $this->bmhNewLine . $header . $this->bmhNewLine, self::VERBOSE_DEBUG);
570
+                        $this->output('  Headers: '.$this->bmhNewLine.$header.$this->bmhNewLine, self::VERBOSE_DEBUG);
571 571
                     }
572 572
 
573 573
                     $processedResult = $this->processBounce($x, 'BODY', $totalCount);
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
                     // move the message
599 599
                     if (!$this->testMode) {
600 600
                         /** @noinspection PhpUsageOfSilenceOperatorInspection */
601
-                        @\imap_mail_move($this->mailboxLink, (string) $x, $this->hardMailbox);
601
+                        @\imap_mail_move($this->mailboxLink, (string)$x, $this->hardMailbox);
602 602
                     }
603 603
 
604 604
                     $moveFlag[$x] = true;
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
                     // move the message
613 613
                     if (!$this->testMode) {
614 614
                         /** @noinspection PhpUsageOfSilenceOperatorInspection */
615
-                        @\imap_mail_move($this->mailboxLink, (string) $x, $this->softMailbox);
615
+                        @\imap_mail_move($this->mailboxLink, (string)$x, $this->softMailbox);
616 616
                     }
617 617
 
618 618
                     $moveFlag[$x] = true;
@@ -636,24 +636,24 @@  discard block
 block discarded – undo
636 636
                 $this->mailboxExist($this->unprocessedBox);
637 637
                 // move the message
638 638
                 /** @noinspection PhpUsageOfSilenceOperatorInspection */
639
-                @\imap_mail_move($this->mailboxLink, (string) $x, $this->unprocessedBox);
639
+                @\imap_mail_move($this->mailboxLink, (string)$x, $this->unprocessedBox);
640 640
                 $moveFlag[$x] = true;
641 641
             }
642 642
 
643 643
             \flush();
644 644
         }
645 645
 
646
-        $this->output($this->bmhNewLine . 'Closing mailbox, and purging messages');
646
+        $this->output($this->bmhNewLine.'Closing mailbox, and purging messages');
647 647
 
648 648
         /** @noinspection PhpUsageOfSilenceOperatorInspection */
649 649
         @\imap_expunge($this->mailboxLink);
650 650
         \imap_close($this->mailboxLink);
651 651
 
652
-        $this->output('Read: ' . $fetchedCount . ' messages');
653
-        $this->output($processedCount . ' action taken');
654
-        $this->output($unprocessedCount . ' no action taken');
655
-        $this->output($deletedCount . ' messages deleted');
656
-        $this->output($movedCount . ' messages moved');
652
+        $this->output('Read: '.$fetchedCount.' messages');
653
+        $this->output($processedCount.' action taken');
654
+        $this->output($unprocessedCount.' no action taken');
655
+        $this->output($deletedCount.' messages deleted');
656
+        $this->output($movedCount.' messages moved');
657 657
 
658 658
         return true;
659 659
     }
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
           break;
764 764
 
765 765
         default: // un-support Content-type
766
-          $this->output('Msg #' . $pos . ' is unsupported Content-Type:' . $structure->type, self::VERBOSE_REPORT);
766
+          $this->output('Msg #'.$pos.' is unsupported Content-Type:'.$structure->type, self::VERBOSE_REPORT);
767 767
 
768 768
           return false;
769 769
       }
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
             }
811 811
 
812 812
             if ($this->testMode) {
813
-                $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
813
+                $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email);
814 814
             } else {
815 815
                 // code below will use the Callback function, but return no value
816 816
                 $params = [
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
         } else {
836 836
             // match rule, do bounce action
837 837
             if ($this->testMode) {
838
-                $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
838
+                $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email);
839 839
 
840 840
                 return true;
841 841
             }
@@ -878,19 +878,19 @@  discard block
 block discarded – undo
878 878
         if (\trim($mailbox) == '') {
879 879
             // this is a critical error with either the mailbox name blank or an invalid mailbox name
880 880
             // need to stop processing and exit at this point
881
-            echo 'Invalid mailbox name for move operation. Cannot continue: ' . $mailbox . "<br />\n";
881
+            echo 'Invalid mailbox name for move operation. Cannot continue: '.$mailbox."<br />\n";
882 882
             exit();
883 883
         }
884 884
 
885
-        $port = $this->port . '/' . $this->service . '/' . $this->serviceOption;
885
+        $port = $this->port.'/'.$this->service.'/'.$this->serviceOption;
886 886
         /** @noinspection PhpUsageOfSilenceOperatorInspection */
887
-        $mbox = @\imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, \OP_HALFOPEN);
887
+        $mbox = @\imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, \OP_HALFOPEN);
888 888
 
889 889
         if ($mbox === false) {
890 890
             return false;
891 891
         }
892 892
 
893
-        $list = \imap_getmailboxes($mbox, '{' . $this->mailhost . ':' . $port . '}', '*');
893
+        $list = \imap_getmailboxes($mbox, '{'.$this->mailhost.':'.$port.'}', '*');
894 894
         $mailboxFound = false;
895 895
 
896 896
         if (\is_array($list)) {
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 
906 906
             if ($mailboxFound === false && $create) {
907 907
                 /** @noinspection PhpUsageOfSilenceOperatorInspection */
908
-                @\imap_createmailbox($mbox, \imap_utf7_encode('{' . $this->mailhost . ':' . $port . '}' . $mailbox));
908
+                @\imap_createmailbox($mbox, \imap_utf7_encode('{'.$this->mailhost.':'.$port.'}'.$mailbox));
909 909
                 \imap_close($mbox);
910 910
 
911 911
                 return true;
Please login to merge, or discard this patch.
src/BounceMailHandler/phpmailer-bmh_rules.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 
523 523
     if ($result['rule_no'] == '0000') {
524 524
         if ($debug_mode) {
525
-            echo 'Body:' . $bmh_newline . $body . $bmh_newline;
525
+            echo 'Body:'.$bmh_newline.$body.$bmh_newline;
526 526
             echo $bmh_newline;
527 527
         }
528 528
     } else {
@@ -572,14 +572,14 @@  discard block
 block discarded – undo
572 572
         /** @noinspection PhpUsageOfSilenceOperatorInspection */
573 573
         $email_arr = @\imap_rfc822_parse_adrlist($email, 'default.domain.name');
574 574
         if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') {
575
-            $result['email'] = $email_arr[0]->mailbox . '@' . $email_arr[0]->host;
575
+            $result['email'] = $email_arr[0]->mailbox.'@'.$email_arr[0]->host;
576 576
         }
577 577
     } elseif (\preg_match('/Final-Recipient: rfc822;(.*)/i', $dsn_report, $match)) {
578 578
         $email = \trim($match[1], "<> \t\r\n\0\x0B");
579 579
         /** @noinspection PhpUsageOfSilenceOperatorInspection */
580 580
         $email_arr = @\imap_rfc822_parse_adrlist($email, 'default.domain.name');
581 581
         if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') {
582
-            $result['email'] = $email_arr[0]->mailbox . '@' . $email_arr[0]->host;
582
+            $result['email'] = $email_arr[0]->mailbox.'@'.$email_arr[0]->host;
583 583
         }
584 584
     }
585 585
 
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
          *   Delivery to the following recipients failed.
1550 1550
          *   [email protected]
1551 1551
          */
1552
-        elseif (\preg_match("/Delivery to the following recipients failed.*\n.*\n.*" . \preg_quote($result['email'], '/') . '/i', $dsn_msg)) {
1552
+        elseif (\preg_match("/Delivery to the following recipients failed.*\n.*\n.*".\preg_quote($result['email'], '/').'/i', $dsn_msg)) {
1553 1553
             $result['rule_cat'] = 'other';
1554 1554
             $result['rule_no'] = '0176';
1555 1555
         }
@@ -1598,11 +1598,11 @@  discard block
 block discarded – undo
1598 1598
 
1599 1599
     if ($result['rule_no'] == '0000') {
1600 1600
         if ($debug_mode) {
1601
-            echo 'email: ' . $result['email'] . $bmh_newline;
1602
-            echo 'Action: ' . $action . $bmh_newline;
1603
-            echo 'Status: ' . $status_code . $bmh_newline;
1604
-            echo 'Diagnostic-Code: ' . $diag_code . $bmh_newline;
1605
-            echo "DSN Message:<br />\n" . $dsn_msg . $bmh_newline;
1601
+            echo 'email: '.$result['email'].$bmh_newline;
1602
+            echo 'Action: '.$action.$bmh_newline;
1603
+            echo 'Status: '.$status_code.$bmh_newline;
1604
+            echo 'Diagnostic-Code: '.$diag_code.$bmh_newline;
1605
+            echo "DSN Message:<br />\n".$dsn_msg.$bmh_newline;
1606 1606
             echo $bmh_newline;
1607 1607
         }
1608 1608
     } else {
Please login to merge, or discard this patch.