Code Duplication    Length = 23-29 lines in 2 locations

src/BounceMailHandler/BounceMailHandler.php 2 locations

@@ 665-687 (lines=23) @@
662
                $email = $header->fromaddress;
663
            }
664
665
            if ($this->testMode) {
666
                $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
667
            } else {
668
                // code below will use the Callback function, but return no value
669
                $params = [
670
                    $pos,
671
                    $bounceType,
672
                    $email,
673
                    $subject,
674
                    $header,
675
                    $remove,
676
                    $ruleNumber,
677
                    $ruleCategory,
678
                    $totalFetched,
679
                    $body,
680
                    $headerFull,
681
                    $bodyFull,
682
                    $status_code,
683
                    $action,
684
                    $diagnostic_code,
685
                ];
686
                \call_user_func_array($this->actionFunction, $params);
687
            }
688
        } else {
689
            // match rule, do bounce action
690
            if ($this->testMode) {
@@ 688-716 (lines=29) @@
685
                ];
686
                \call_user_func_array($this->actionFunction, $params);
687
            }
688
        } else {
689
            // match rule, do bounce action
690
            if ($this->testMode) {
691
                $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
692
693
                return true;
694
            }
695
696
            $params = [
697
                $pos,
698
                $bounceType,
699
                $email,
700
                $subject,
701
                $xheader,
702
                $remove,
703
                $ruleNumber,
704
                $ruleCategory,
705
                $totalFetched,
706
                $body,
707
                $headerFull,
708
                $bodyFull,
709
                $status_code,
710
                $action,
711
                $diagnostic_code,
712
            ];
713
            \call_user_func_array($this->actionFunction, $params);
714
715
            return $result;
716
        }
717
718
        return false;
719
    }