@@ -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, '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 |
||
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; |
@@ -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 | */ |
@@ -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; |
@@ -85,7 +85,7 @@ discard block |
||
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 |
||
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 | } |
@@ -522,7 +522,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 { |
@@ -313,14 +313,14 @@ discard block |
||
313 | 313 | $dateArr = \explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd |
314 | 314 | $delDate = \mktime(0, 0, 0, $dateArr[1], $dateArr[2], $dateArr[0]); |
315 | 315 | |
316 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
317 | - $mboxt = \imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
316 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
317 | + $mboxt = \imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
318 | 318 | |
319 | 319 | if ($mboxt === false) { |
320 | 320 | return false; |
321 | 321 | } |
322 | 322 | |
323 | - $list = \imap_getmailboxes($mboxt, '{' . $this->mailhost . ':' . $port . '}', '*'); |
|
323 | + $list = \imap_getmailboxes($mboxt, '{'.$this->mailhost.':'.$port.'}', '*'); |
|
324 | 324 | |
325 | 325 | if (\is_array($list)) { |
326 | 326 | foreach ($list as $key => $val) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $nameRaw = $nameArr[\count($nameArr) - 1]; |
330 | 330 | |
331 | 331 | if (\stripos($nameRaw, 'sent') === false) { |
332 | - $mboxd = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
332 | + $mboxd = \imap_open('{'.$this->mailhost.':'.$port.'}'.$nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
333 | 333 | $messages = \imap_sort($mboxd, SORTDATE, 0); |
334 | 334 | |
335 | 335 | foreach ($messages as $message) { |
@@ -393,19 +393,19 @@ discard block |
||
393 | 393 | if (\trim($mailbox) === '') { |
394 | 394 | // this is a critical error with either the mailbox name blank or an invalid mailbox name |
395 | 395 | // need to stop processing and exit at this point |
396 | - echo 'Invalid mailbox name for move operation. Cannot continue: ' . $mailbox . "<br />\n"; |
|
396 | + echo 'Invalid mailbox name for move operation. Cannot continue: '.$mailbox."<br />\n"; |
|
397 | 397 | exit(); |
398 | 398 | } |
399 | 399 | |
400 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
400 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
401 | 401 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
402 | - $mbox = @\imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
402 | + $mbox = @\imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
403 | 403 | |
404 | 404 | if ($mbox === false) { |
405 | 405 | return false; |
406 | 406 | } |
407 | 407 | |
408 | - $list = \imap_getmailboxes($mbox, '{' . $this->mailhost . ':' . $port . '}', '*'); |
|
408 | + $list = \imap_getmailboxes($mbox, '{'.$this->mailhost.':'.$port.'}', '*'); |
|
409 | 409 | $mailboxFound = false; |
410 | 410 | |
411 | 411 | if (\is_array($list)) { |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | if ($mailboxFound === false && $create) { |
422 | 422 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
423 | - @\imap_createmailbox($mbox, \imap_utf7_encode('{' . $this->mailhost . ':' . $port . '}' . $mailbox)); |
|
423 | + @\imap_createmailbox($mbox, \imap_utf7_encode('{'.$this->mailhost.':'.$port.'}'.$mailbox)); |
|
424 | 424 | \imap_close($mbox); |
425 | 425 | |
426 | 426 | return true; |
@@ -454,13 +454,13 @@ discard block |
||
454 | 454 | } |
455 | 455 | |
456 | 456 | if (!$this->mailboxLink) { |
457 | - $this->errorMessage = 'Cannot open the mailbox file to ' . $filePath . $this->bmhNewLine . 'Error MSG: ' . \imap_last_error(); |
|
457 | + $this->errorMessage = 'Cannot open the mailbox file to '.$filePath.$this->bmhNewLine.'Error MSG: '.\imap_last_error(); |
|
458 | 458 | $this->output(); |
459 | 459 | |
460 | 460 | return false; |
461 | 461 | } |
462 | 462 | |
463 | - $this->output('Opened ' . $filePath); |
|
463 | + $this->output('Opened '.$filePath); |
|
464 | 464 | |
465 | 465 | return true; |
466 | 466 | } |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | { |
475 | 475 | // before starting the processing, let's check the delete flag and do global deletes if true |
476 | 476 | if (\trim($this->deleteMsgDate) !== '') { |
477 | - echo 'processing global delete based on date of ' . $this->deleteMsgDate . '<br />'; |
|
477 | + echo 'processing global delete based on date of '.$this->deleteMsgDate.'<br />'; |
|
478 | 478 | $this->globalDelete(); |
479 | 479 | } |
480 | 480 | |
@@ -484,24 +484,24 @@ discard block |
||
484 | 484 | $this->moveHard = false; |
485 | 485 | } |
486 | 486 | |
487 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
487 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
488 | 488 | |
489 | 489 | \set_time_limit(self::SECONDS_TIMEOUT); |
490 | 490 | |
491 | 491 | if (!$this->testMode) { |
492 | - $this->mailboxLink = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE | ($this->testMode ? OP_READONLY : 0)); |
|
492 | + $this->mailboxLink = \imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE | ($this->testMode ? OP_READONLY : 0)); |
|
493 | 493 | } else { |
494 | - $this->mailboxLink = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? OP_READONLY : 0)); |
|
494 | + $this->mailboxLink = \imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, ($this->testMode ? OP_READONLY : 0)); |
|
495 | 495 | } |
496 | 496 | |
497 | 497 | if (!$this->mailboxLink) { |
498 | - $this->errorMessage = 'Cannot create ' . $this->service . ' connection to ' . $this->mailhost . $this->bmhNewLine . 'Error MSG: ' . \imap_last_error(); |
|
498 | + $this->errorMessage = 'Cannot create '.$this->service.' connection to '.$this->mailhost.$this->bmhNewLine.'Error MSG: '.\imap_last_error(); |
|
499 | 499 | $this->output(); |
500 | 500 | |
501 | 501 | return false; |
502 | 502 | } |
503 | 503 | |
504 | - $this->output('Connected to: ' . $this->mailhost . ' (' . $this->mailboxUserName . ')'); |
|
504 | + $this->output('Connected to: '.$this->mailhost.' ('.$this->mailboxUserName.')'); |
|
505 | 505 | |
506 | 506 | return true; |
507 | 507 | } |
@@ -516,9 +516,9 @@ discard block |
||
516 | 516 | { |
517 | 517 | if ($this->verbose >= $verboseLevel) { |
518 | 518 | if ($msg) { |
519 | - echo $msg . $this->bmhNewLine; |
|
519 | + echo $msg.$this->bmhNewLine; |
|
520 | 520 | } else { |
521 | - echo $this->errorMessage . $this->bmhNewLine; |
|
521 | + echo $this->errorMessage.$this->bmhNewLine; |
|
522 | 522 | } |
523 | 523 | } |
524 | 524 | } |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | break; |
605 | 605 | |
606 | 606 | default: // un-support Content-type |
607 | - $this->output('Msg #' . $pos . ' is unsupported Content-Type:' . $structure->type, self::VERBOSE_REPORT); |
|
607 | + $this->output('Msg #'.$pos.' is unsupported Content-Type:'.$structure->type, self::VERBOSE_REPORT); |
|
608 | 608 | |
609 | 609 | return false; |
610 | 610 | } |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | } |
652 | 652 | |
653 | 653 | if ($this->testMode) { |
654 | - $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email); |
|
654 | + $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email); |
|
655 | 655 | } else { |
656 | 656 | // code below will use the Callback function, but return no value |
657 | 657 | $params = [ |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | } else { |
677 | 677 | // match rule, do bounce action |
678 | 678 | if ($this->testMode) { |
679 | - $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email); |
|
679 | + $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email); |
|
680 | 680 | |
681 | 681 | return true; |
682 | 682 | } |
@@ -742,12 +742,12 @@ discard block |
||
742 | 742 | $unprocessedCount = 0; |
743 | 743 | $deletedCount = 0; |
744 | 744 | $movedCount = 0; |
745 | - $this->output('Total: ' . $totalCount . ' messages '); |
|
745 | + $this->output('Total: '.$totalCount.' messages '); |
|
746 | 746 | |
747 | 747 | // process maximum number of messages |
748 | 748 | if ($fetchedCount > $this->maxMessages) { |
749 | 749 | $fetchedCount = $this->maxMessages; |
750 | - $this->output('Processing first ' . $fetchedCount . ' messages '); |
|
750 | + $this->output('Processing first '.$fetchedCount.' messages '); |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | if ($this->testMode) { |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $processedResult = $this->processBounce($x, 'DSN', $totalCount); |
790 | 790 | } else { |
791 | 791 | // not standard DSN msg |
792 | - $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT); |
|
792 | + $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT); |
|
793 | 793 | |
794 | 794 | if ($this->debugBodyRule) { |
795 | 795 | if ($structure->ifdescription) { |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | $processedResult = $this->processBounce($x, 'DSN', $totalCount); |
816 | 816 | } else { |
817 | 817 | // not standard DSN msg |
818 | - $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT); |
|
818 | + $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT); |
|
819 | 819 | |
820 | 820 | if ($this->debugBodyRule) { |
821 | 821 | $this->output(" Content-Type : {$match[1]}", self::VERBOSE_DEBUG); |
@@ -825,10 +825,10 @@ discard block |
||
825 | 825 | } |
826 | 826 | } else { |
827 | 827 | // didn't get content-type header |
828 | - $this->output('Msg #' . $x . ' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT); |
|
828 | + $this->output('Msg #'.$x.' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT); |
|
829 | 829 | |
830 | 830 | if ($this->debugBodyRule) { |
831 | - $this->output(' Headers: ' . $this->bmhNewLine . $header . $this->bmhNewLine, self::VERBOSE_DEBUG); |
|
831 | + $this->output(' Headers: '.$this->bmhNewLine.$header.$this->bmhNewLine, self::VERBOSE_DEBUG); |
|
832 | 832 | } |
833 | 833 | |
834 | 834 | $processedResult = $this->processBounce($x, 'BODY', $totalCount); |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | // move the message |
860 | 860 | if (!$this->testMode) { |
861 | 861 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
862 | - @\imap_mail_move($this->mailboxLink, (string) $x, $this->hardMailbox); |
|
862 | + @\imap_mail_move($this->mailboxLink, (string)$x, $this->hardMailbox); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | $moveFlag[$x] = true; |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | // move the message |
874 | 874 | if (!$this->testMode) { |
875 | 875 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
876 | - @\imap_mail_move($this->mailboxLink, (string) $x, $this->softMailbox); |
|
876 | + @\imap_mail_move($this->mailboxLink, (string)$x, $this->softMailbox); |
|
877 | 877 | } |
878 | 878 | |
879 | 879 | $moveFlag[$x] = true; |
@@ -897,24 +897,24 @@ discard block |
||
897 | 897 | $this->mailboxExist($this->unprocessedBox); |
898 | 898 | // move the message |
899 | 899 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
900 | - @\imap_mail_move($this->mailboxLink, (string) $x, $this->unprocessedBox); |
|
900 | + @\imap_mail_move($this->mailboxLink, (string)$x, $this->unprocessedBox); |
|
901 | 901 | $moveFlag[$x] = true; |
902 | 902 | } |
903 | 903 | |
904 | 904 | \flush(); |
905 | 905 | } |
906 | 906 | |
907 | - $this->output($this->bmhNewLine . 'Closing mailbox, and purging messages'); |
|
907 | + $this->output($this->bmhNewLine.'Closing mailbox, and purging messages'); |
|
908 | 908 | |
909 | 909 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
910 | 910 | @\imap_expunge($this->mailboxLink); |
911 | 911 | \imap_close($this->mailboxLink); |
912 | 912 | |
913 | - $this->output('Read: ' . $fetchedCount . ' messages'); |
|
914 | - $this->output($processedCount . ' action taken'); |
|
915 | - $this->output($unprocessedCount . ' no action taken'); |
|
916 | - $this->output($deletedCount . ' messages deleted'); |
|
917 | - $this->output($movedCount . ' messages moved'); |
|
913 | + $this->output('Read: '.$fetchedCount.' messages'); |
|
914 | + $this->output($processedCount.' action taken'); |
|
915 | + $this->output($unprocessedCount.' no action taken'); |
|
916 | + $this->output($deletedCount.' messages deleted'); |
|
917 | + $this->output($movedCount.' messages moved'); |
|
918 | 918 | |
919 | 919 | return true; |
920 | 920 | } |