Completed
Push — master ( 6d1a51...be646c )
by Lars
02:36
created
examples/callback_csv.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,9 +69,9 @@
 block discarded – undo
69 69
 /**
70 70
  * Function to clean the data from the Callback Function for optimized display
71 71
  *
72
- * @param $email
73
- * @param $bounce_type
74
- * @param $remove
72
+ * @param string $email
73
+ * @param string $bounce_type
74
+ * @param boolean $remove
75 75
  *
76 76
  * @return mixed
77 77
  */
Please login to merge, or discard this 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, 'a');
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 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
 /**
41 41
  * Function to clean the data from the Callback Function for optimized display
42 42
  *
43
- * @param $email
44
- * @param $bounceType
45
- * @param $remove
43
+ * @param string $email
44
+ * @param string $bounceType
45
+ * @param boolean $remove
46 46
  *
47 47
  * @return mixed
48 48
  */
Please login to merge, or discard this 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 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -772,7 +772,7 @@
 block discarded – undo
772 772
    * @param string  $mailbox the mailbox name, must be in 'INBOX.checkmailbox' format
773 773
    * @param boolean $create  whether or not to create the checkmailbox if not found, defaults to true
774 774
    *
775
-   * @return boolean
775
+   * @return null|boolean
776 776
    */
777 777
   public function mailboxExist($mailbox, $create = true)
778 778
   {
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  */
17 17
 namespace BounceMailHandler;
18 18
 
19
-require_once __DIR__ . '/phpmailer-bmh_rules.php';
19
+require_once __DIR__.'/phpmailer-bmh_rules.php';
20 20
 
21 21
 /**
22 22
  * BounceMailHandler class
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
   {
278 278
     // before starting the processing, let's check the delete flag and do global deletes if true
279 279
     if (trim($this->deleteMsgDate) != '') {
280
-      echo 'processing global delete based on date of ' . $this->deleteMsgDate . '<br />';
280
+      echo 'processing global delete based on date of '.$this->deleteMsgDate.'<br />';
281 281
       $this->globalDelete();
282 282
     }
283 283
 
@@ -287,23 +287,23 @@  discard block
 block discarded – undo
287 287
       $this->moveHard = false;
288 288
     }
289 289
 
290
-    $port = $this->port . '/' . $this->service . '/' . $this->serviceOption;
290
+    $port = $this->port.'/'.$this->service.'/'.$this->serviceOption;
291 291
 
292 292
     set_time_limit(6000);
293 293
 
294 294
     if (!$this->testMode) {
295
-      $this->mailboxLink = imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE | ($this->testMode ? OP_READONLY : 0));
295
+      $this->mailboxLink = imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE | ($this->testMode ? OP_READONLY : 0));
296 296
     } else {
297
-      $this->mailboxLink = imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? OP_READONLY : 0));
297
+      $this->mailboxLink = imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? OP_READONLY : 0));
298 298
     }
299 299
 
300 300
     if (!$this->mailboxLink) {
301
-      $this->errorMessage = 'Cannot create ' . $this->service . ' connection to ' . $this->mailhost . $this->bmhNewLine . 'Error MSG: ' . imap_last_error();
301
+      $this->errorMessage = 'Cannot create '.$this->service.' connection to '.$this->mailhost.$this->bmhNewLine.'Error MSG: '.imap_last_error();
302 302
       $this->output();
303 303
 
304 304
       return false;
305 305
     } else {
306
-      $this->output('Connected to: ' . $this->mailhost . ' (' . $this->mailboxUserName . ')');
306
+      $this->output('Connected to: '.$this->mailhost.' ('.$this->mailboxUserName.')');
307 307
 
308 308
       return true;
309 309
     }
@@ -319,14 +319,14 @@  discard block
 block discarded – undo
319 319
     $dateArr = explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd
320 320
     $delDate = mktime(0, 0, 0, $dateArr[1], $dateArr[2], $dateArr[0]);
321 321
 
322
-    $port = $this->port . '/' . $this->service . '/' . $this->serviceOption;
323
-    $mboxt = imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN);
322
+    $port = $this->port.'/'.$this->service.'/'.$this->serviceOption;
323
+    $mboxt = imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN);
324 324
 
325 325
     if ($mboxt === false) {
326 326
       return false;
327 327
     }
328 328
 
329
-    $list = imap_getmailboxes($mboxt, '{' . $this->mailhost . ':' . $port . '}', '*');
329
+    $list = imap_getmailboxes($mboxt, '{'.$this->mailhost.':'.$port.'}', '*');
330 330
 
331 331
     if (is_array($list)) {
332 332
       foreach ($list as $key => $val) {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         $nameRaw = $nameArr[count($nameArr) - 1];
336 336
 
337 337
         if (!stristr($nameRaw, 'sent')) {
338
-          $mboxd = imap_open('{' . $this->mailhost . ':' . $port . '}' . $nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE);
338
+          $mboxd = imap_open('{'.$this->mailhost.':'.$port.'}'.$nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE);
339 339
           $messages = imap_sort($mboxd, SORTDATE, 0);
340 340
           $i = 0;
341 341
 
@@ -375,9 +375,9 @@  discard block
 block discarded – undo
375 375
   {
376 376
     if ($this->verbose >= $verboseLevel) {
377 377
       if (empty($msg)) {
378
-        echo $this->errorMessage . $this->bmhNewLine;
378
+        echo $this->errorMessage.$this->bmhNewLine;
379 379
       } else {
380
-        echo $msg . $this->bmhNewLine;
380
+        echo $msg.$this->bmhNewLine;
381 381
       }
382 382
     }
383 383
   }
@@ -400,12 +400,12 @@  discard block
 block discarded – undo
400 400
     }
401 401
 
402 402
     if (!$this->mailboxLink) {
403
-      $this->errorMessage = 'Cannot open the mailbox file to ' . $filePath . $this->bmhNewLine . 'Error MSG: ' . imap_last_error();
403
+      $this->errorMessage = 'Cannot open the mailbox file to '.$filePath.$this->bmhNewLine.'Error MSG: '.imap_last_error();
404 404
       $this->output();
405 405
 
406 406
       return false;
407 407
     } else {
408
-      $this->output('Opened ' . $filePath);
408
+      $this->output('Opened '.$filePath);
409 409
 
410 410
       return true;
411 411
     }
@@ -443,12 +443,12 @@  discard block
 block discarded – undo
443 443
     $unprocessedCount = 0;
444 444
     $deletedCount = 0;
445 445
     $movedCount = 0;
446
-    $this->output('Total: ' . $totalCount . ' messages ');
446
+    $this->output('Total: '.$totalCount.' messages ');
447 447
 
448 448
     // process maximum number of messages
449 449
     if ($fetchedCount > $this->maxMessages) {
450 450
       $fetchedCount = $this->maxMessages;
451
-      $this->output('Processing first ' . $fetchedCount . ' messages ');
451
+      $this->output('Processing first '.$fetchedCount.' messages ');
452 452
     }
453 453
 
454 454
     if ($this->testMode) {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
           $processed = $this->processBounce($x, 'DSN', $totalCount);
486 486
         } else {
487 487
           // not standard DSN msg
488
-          $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT);
488
+          $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT);
489 489
 
490 490
           if ($this->debugBodyRule) {
491 491
             if ($structure->ifdescription) {
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
             $processed = $this->processBounce($x, 'DSN', $totalCount);
508 508
           } else {
509 509
             // not standard DSN msg
510
-            $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT);
510
+            $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT);
511 511
 
512 512
             if ($this->debugBodyRule) {
513 513
               $this->output("  Content-Type : {$match[1]}", self::VERBOSE_DEBUG);
@@ -517,10 +517,10 @@  discard block
 block discarded – undo
517 517
           }
518 518
         } else {
519 519
           // didn't get content-type header
520
-          $this->output('Msg #' . $x . ' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT);
520
+          $this->output('Msg #'.$x.' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT);
521 521
 
522 522
           if ($this->debugBodyRule) {
523
-            $this->output('  Headers: ' . $this->bmhNewLine . $header . $this->bmhNewLine, self::VERBOSE_DEBUG);
523
+            $this->output('  Headers: '.$this->bmhNewLine.$header.$this->bmhNewLine, self::VERBOSE_DEBUG);
524 524
           }
525 525
 
526 526
           $processed = $this->processBounce($x, 'BODY', $totalCount);
@@ -589,15 +589,15 @@  discard block
 block discarded – undo
589 589
       flush();
590 590
     }
591 591
 
592
-    $this->output($this->bmhNewLine . 'Closing mailbox, and purging messages');
592
+    $this->output($this->bmhNewLine.'Closing mailbox, and purging messages');
593 593
 
594 594
     imap_close($this->mailboxLink);
595 595
 
596
-    $this->output('Read: ' . $fetchedCount . ' messages');
597
-    $this->output($processedCount . ' action taken');
598
-    $this->output($unprocessedCount . ' no action taken');
599
-    $this->output($deletedCount . ' messages deleted');
600
-    $this->output($movedCount . ' messages moved');
596
+    $this->output('Read: '.$fetchedCount.' messages');
597
+    $this->output($processedCount.' action taken');
598
+    $this->output($unprocessedCount.' no action taken');
599
+    $this->output($deletedCount.' messages deleted');
600
+    $this->output($movedCount.' messages moved');
601 601
 
602 602
     return true;
603 603
   }
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
           break;
696 696
 
697 697
         default: // unsupport Content-type
698
-          $this->output('Msg #' . $pos . ' is unsupported Content-Type:' . $structure->type, self::VERBOSE_REPORT);
698
+          $this->output('Msg #'.$pos.' is unsupported Content-Type:'.$structure->type, self::VERBOSE_REPORT);
699 699
 
700 700
           return false;
701 701
       }
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
       }
743 743
 
744 744
       if ($this->testMode) {
745
-        $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
745
+        $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email);
746 746
       } else {
747 747
         // code below will use the Callback function, but return no value
748 748
         $params = array(
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
     } else {
768 768
       // match rule, do bounce action
769 769
       if ($this->testMode) {
770
-        $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
770
+        $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email);
771 771
 
772 772
         return true;
773 773
       } else {
@@ -814,14 +814,14 @@  discard block
 block discarded – undo
814 814
       exit();
815 815
     }
816 816
 
817
-    $port = $this->port . '/' . $this->service . '/' . $this->serviceOption;
818
-    $mbox = imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN);
817
+    $port = $this->port.'/'.$this->service.'/'.$this->serviceOption;
818
+    $mbox = imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN);
819 819
 
820 820
     if ($mbox === false) {
821 821
       return false;
822 822
     }
823 823
 
824
-    $list = imap_getmailboxes($mbox, '{' . $this->mailhost . ':' . $port . '}', '*');
824
+    $list = imap_getmailboxes($mbox, '{'.$this->mailhost.':'.$port.'}', '*');
825 825
     $mailboxFound = false;
826 826
 
827 827
     if (is_array($list)) {
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
 
837 837
       if (($mailboxFound === false) && $create) {
838 838
         /** @noinspection PhpUsageOfSilenceOperatorInspection */
839
-        @imap_createmailbox($mbox, imap_utf7_encode('{' . $this->mailhost . ':' . $port . '}' . $mailbox));
839
+        @imap_createmailbox($mbox, imap_utf7_encode('{'.$this->mailhost.':'.$port.'}'.$mailbox));
840 840
         imap_close($mbox);
841 841
 
842 842
         return true;
Please login to merge, or discard this patch.
examples/callback_database.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
 /**
41 41
  * Function to clean the data from the Callback Function for optimized display
42 42
  *
43
- * @param $email
44
- * @param $bounceType
45
- * @param $remove
43
+ * @param string $email
44
+ * @param string $bounceType
45
+ * @param boolean $remove
46 46
  *
47 47
  * @return mixed
48 48
  */
Please login to merge, or discard this 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.
examples/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 //$bmh->debugBodyRule      = false; // false is default, no need to specify
52 52
 //$bmh->debugDsnRule       = false; // false is default, no need to specify
53 53
 //$bmh->purgeUnprocessed   = false; // false is default, no need to specify
54
-$bmh->disableDelete        = true; // false is default, no need to specify
54
+$bmh->disableDelete = true; // false is default, no need to specify
55 55
 
56 56
 /*
57 57
  * for local mailbox (to process .EML files)
@@ -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
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
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
   global $rule_categories, $bmh_newline;
494 494
   if ($result['rule_no'] == '0000') {
495 495
     if ($debug_mode) {
496
-      echo 'Body:' . $bmh_newline . $body . $bmh_newline;
496
+      echo 'Body:'.$bmh_newline.$body.$bmh_newline;
497 497
       echo $bmh_newline;
498 498
     }
499 499
   } else {
@@ -541,14 +541,14 @@  discard block
 block discarded – undo
541 541
     /** @noinspection PhpUsageOfSilenceOperatorInspection */
542 542
     $email_arr = @imap_rfc822_parse_adrlist($email, 'default.domain.name');
543 543
     if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') {
544
-      $result['email'] = $email_arr[0]->mailbox . '@' . $email_arr[0]->host;
544
+      $result['email'] = $email_arr[0]->mailbox.'@'.$email_arr[0]->host;
545 545
     }
546 546
   } elseif (preg_match('/Final-Recipient: rfc822;(.*)/i', $dsn_report, $match)) {
547 547
     $email = trim($match[1], "<> \t\r\n\0\x0B");
548 548
     /** @noinspection PhpUsageOfSilenceOperatorInspection */
549 549
     $email_arr = @imap_rfc822_parse_adrlist($email, 'default.domain.name');
550 550
     if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') {
551
-      $result['email'] = $email_arr[0]->mailbox . '@' . $email_arr[0]->host;
551
+      $result['email'] = $email_arr[0]->mailbox.'@'.$email_arr[0]->host;
552 552
     }
553 553
   }
554 554
 
@@ -1517,7 +1517,7 @@  discard block
 block discarded – undo
1517 1517
          *   Delivery to the following recipients failed.
1518 1518
          *   [email protected]
1519 1519
          */
1520
-        elseif (preg_match("/Delivery to the following recipients failed.*\n.*\n.*" . $result['email'] . '/i', $dsn_msg)) {
1520
+        elseif (preg_match("/Delivery to the following recipients failed.*\n.*\n.*".$result['email'].'/i', $dsn_msg)) {
1521 1521
           $result['rule_cat'] = 'other';
1522 1522
           $result['rule_no'] = '0176';
1523 1523
         }
@@ -1565,11 +1565,11 @@  discard block
 block discarded – undo
1565 1565
   global $rule_categories, $bmh_newline;
1566 1566
   if ($result['rule_no'] == '0000') {
1567 1567
     if ($debug_mode) {
1568
-      echo 'email: ' . $result['email'] . $bmh_newline;
1569
-      echo 'Action: ' . $action . $bmh_newline;
1570
-      echo 'Status: ' . $status_code . $bmh_newline;
1571
-      echo 'Diagnostic-Code: ' . $diag_code . $bmh_newline;
1572
-      echo "DSN Message:<br />\n" . $dsn_msg . $bmh_newline;
1568
+      echo 'email: '.$result['email'].$bmh_newline;
1569
+      echo 'Action: '.$action.$bmh_newline;
1570
+      echo 'Status: '.$status_code.$bmh_newline;
1571
+      echo 'Diagnostic-Code: '.$diag_code.$bmh_newline;
1572
+      echo "DSN Message:<br />\n".$dsn_msg.$bmh_newline;
1573 1573
       echo $bmh_newline;
1574 1574
     }
1575 1575
   } else {
Please login to merge, or discard this patch.