@@ -69,9 +69,9 @@ |
||
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 | */ |
@@ -36,15 +36,15 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -58,9 +58,9 @@ |
||
58 | 58 | /** |
59 | 59 | * Function to clean the data from the Callback Function for optimized display |
60 | 60 | * |
61 | - * @param $email |
|
62 | - * @param $bounceType |
|
63 | - * @param $remove |
|
61 | + * @param string $email |
|
62 | + * @param string $bounceType |
|
63 | + * @param boolean $remove |
|
64 | 64 | * |
65 | 65 | * @return mixed |
66 | 66 | */ |
@@ -50,7 +50,7 @@ discard block |
||
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 |
||
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; |
@@ -772,7 +772,7 @@ |
||
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 | { |
@@ -16,7 +16,7 @@ discard block |
||
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 |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | { |
311 | 311 | // before starting the processing, let's check the delete flag and do global deletes if true |
312 | 312 | if (trim($this->deleteMsgDate) != '') { |
313 | - echo 'processing global delete based on date of ' . $this->deleteMsgDate . '<br />'; |
|
313 | + echo 'processing global delete based on date of '.$this->deleteMsgDate.'<br />'; |
|
314 | 314 | $this->globalDelete(); |
315 | 315 | } |
316 | 316 | |
@@ -320,24 +320,24 @@ discard block |
||
320 | 320 | $this->moveHard = false; |
321 | 321 | } |
322 | 322 | |
323 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
323 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
324 | 324 | |
325 | 325 | set_time_limit(6000); |
326 | 326 | |
327 | 327 | if (!$this->testMode) { |
328 | - $this->mailboxLink = imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE | ($this->testMode ? OP_READONLY : 0)); |
|
328 | + $this->mailboxLink = imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE | ($this->testMode ? OP_READONLY : 0)); |
|
329 | 329 | } else { |
330 | - $this->mailboxLink = imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? OP_READONLY : 0)); |
|
330 | + $this->mailboxLink = imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? OP_READONLY : 0)); |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | if (!$this->mailboxLink) { |
334 | - $this->errorMessage = 'Cannot create ' . $this->service . ' connection to ' . $this->mailhost . $this->bmhNewLine . 'Error MSG: ' . imap_last_error(); |
|
334 | + $this->errorMessage = 'Cannot create '.$this->service.' connection to '.$this->mailhost.$this->bmhNewLine.'Error MSG: '.imap_last_error(); |
|
335 | 335 | $this->output(); |
336 | 336 | |
337 | 337 | return false; |
338 | 338 | } |
339 | 339 | |
340 | - $this->output('Connected to: ' . $this->mailhost . ' (' . $this->mailboxUserName . ')'); |
|
340 | + $this->output('Connected to: '.$this->mailhost.' ('.$this->mailboxUserName.')'); |
|
341 | 341 | |
342 | 342 | return true; |
343 | 343 | } |
@@ -352,14 +352,14 @@ discard block |
||
352 | 352 | $dateArr = explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd |
353 | 353 | $delDate = mktime(0, 0, 0, $dateArr[1], $dateArr[2], $dateArr[0]); |
354 | 354 | |
355 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
356 | - $mboxt = imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
355 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
356 | + $mboxt = imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
357 | 357 | |
358 | 358 | if ($mboxt === false) { |
359 | 359 | return false; |
360 | 360 | } |
361 | 361 | |
362 | - $list = imap_getmailboxes($mboxt, '{' . $this->mailhost . ':' . $port . '}', '*'); |
|
362 | + $list = imap_getmailboxes($mboxt, '{'.$this->mailhost.':'.$port.'}', '*'); |
|
363 | 363 | |
364 | 364 | if (is_array($list)) { |
365 | 365 | foreach ($list as $key => $val) { |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | $nameRaw = $nameArr[count($nameArr) - 1]; |
369 | 369 | |
370 | 370 | if (false === stripos($nameRaw, 'sent')) { |
371 | - $mboxd = imap_open('{' . $this->mailhost . ':' . $port . '}' . $nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
371 | + $mboxd = imap_open('{'.$this->mailhost.':'.$port.'}'.$nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
372 | 372 | $messages = imap_sort($mboxd, SORTDATE, 0); |
373 | 373 | $i = 0; |
374 | 374 | |
@@ -408,9 +408,9 @@ discard block |
||
408 | 408 | { |
409 | 409 | if ($this->verbose >= $verboseLevel) { |
410 | 410 | if (empty($msg)) { |
411 | - echo $this->errorMessage . $this->bmhNewLine; |
|
411 | + echo $this->errorMessage.$this->bmhNewLine; |
|
412 | 412 | } else { |
413 | - echo $msg . $this->bmhNewLine; |
|
413 | + echo $msg.$this->bmhNewLine; |
|
414 | 414 | } |
415 | 415 | } |
416 | 416 | } |
@@ -433,13 +433,13 @@ discard block |
||
433 | 433 | } |
434 | 434 | |
435 | 435 | if (!$this->mailboxLink) { |
436 | - $this->errorMessage = 'Cannot open the mailbox file to ' . $filePath . $this->bmhNewLine . 'Error MSG: ' . imap_last_error(); |
|
436 | + $this->errorMessage = 'Cannot open the mailbox file to '.$filePath.$this->bmhNewLine.'Error MSG: '.imap_last_error(); |
|
437 | 437 | $this->output(); |
438 | 438 | |
439 | 439 | return false; |
440 | 440 | } |
441 | 441 | |
442 | - $this->output('Opened ' . $filePath); |
|
442 | + $this->output('Opened '.$filePath); |
|
443 | 443 | |
444 | 444 | return true; |
445 | 445 | } |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | $unprocessedCount = 0; |
477 | 477 | $deletedCount = 0; |
478 | 478 | $movedCount = 0; |
479 | - $this->output('Total: ' . $totalCount . ' messages '); |
|
479 | + $this->output('Total: '.$totalCount.' messages '); |
|
480 | 480 | |
481 | 481 | // process maximum number of messages |
482 | 482 | if ($fetchedCount > $this->maxMessages) { |
483 | 483 | $fetchedCount = $this->maxMessages; |
484 | - $this->output('Processing first ' . $fetchedCount . ' messages '); |
|
484 | + $this->output('Processing first '.$fetchedCount.' messages '); |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | if ($this->testMode) { |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | $processedResult = $this->processBounce($x, 'DSN', $totalCount); |
526 | 526 | } else { |
527 | 527 | // not standard DSN msg |
528 | - $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT); |
|
528 | + $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT); |
|
529 | 529 | |
530 | 530 | if ($this->debugBodyRule) { |
531 | 531 | if ($structure->ifdescription) { |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | $processedResult = $this->processBounce($x, 'DSN', $totalCount); |
552 | 552 | } else { |
553 | 553 | // not standard DSN msg |
554 | - $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT); |
|
554 | + $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT); |
|
555 | 555 | |
556 | 556 | if ($this->debugBodyRule) { |
557 | 557 | $this->output(" Content-Type : {$match[1]}", self::VERBOSE_DEBUG); |
@@ -561,10 +561,10 @@ discard block |
||
561 | 561 | } |
562 | 562 | } else { |
563 | 563 | // didn't get content-type header |
564 | - $this->output('Msg #' . $x . ' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT); |
|
564 | + $this->output('Msg #'.$x.' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT); |
|
565 | 565 | |
566 | 566 | if ($this->debugBodyRule) { |
567 | - $this->output(' Headers: ' . $this->bmhNewLine . $header . $this->bmhNewLine, self::VERBOSE_DEBUG); |
|
567 | + $this->output(' Headers: '.$this->bmhNewLine.$header.$this->bmhNewLine, self::VERBOSE_DEBUG); |
|
568 | 568 | } |
569 | 569 | |
570 | 570 | $processedResult = $this->processBounce($x, 'BODY', $totalCount); |
@@ -645,17 +645,17 @@ discard block |
||
645 | 645 | flush(); |
646 | 646 | } |
647 | 647 | |
648 | - $this->output($this->bmhNewLine . 'Closing mailbox, and purging messages'); |
|
648 | + $this->output($this->bmhNewLine.'Closing mailbox, and purging messages'); |
|
649 | 649 | |
650 | 650 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
651 | 651 | @imap_expunge($this->mailboxLink); |
652 | 652 | imap_close($this->mailboxLink); |
653 | 653 | |
654 | - $this->output('Read: ' . $fetchedCountOutput . ' messages'); |
|
655 | - $this->output($processedCount . ' action taken'); |
|
656 | - $this->output($unprocessedCount . ' no action taken'); |
|
657 | - $this->output($deletedCount . ' messages deleted'); |
|
658 | - $this->output($movedCount . ' messages moved'); |
|
654 | + $this->output('Read: '.$fetchedCountOutput.' messages'); |
|
655 | + $this->output($processedCount.' action taken'); |
|
656 | + $this->output($unprocessedCount.' no action taken'); |
|
657 | + $this->output($deletedCount.' messages deleted'); |
|
658 | + $this->output($movedCount.' messages moved'); |
|
659 | 659 | |
660 | 660 | return true; |
661 | 661 | } |
@@ -763,7 +763,7 @@ discard block |
||
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 |
||
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 = array( |
@@ -835,7 +835,7 @@ discard block |
||
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 |
||
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 |
||
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; |
@@ -32,7 +32,7 @@ discard block |
||
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 |
||
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; |
@@ -58,9 +58,9 @@ |
||
58 | 58 | /** |
59 | 59 | * Function to clean the data from the Callback Function for optimized display |
60 | 60 | * |
61 | - * @param $email |
|
62 | - * @param $bounceType |
|
63 | - * @param $remove |
|
61 | + * @param string $email |
|
62 | + * @param string $bounceType |
|
63 | + * @param boolean $remove |
|
64 | 64 | * |
65 | 65 | * @return mixed |
66 | 66 | */ |
@@ -493,7 +493,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 { |
@@ -85,7 +85,7 @@ |
||
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 |