Code Duplication    Length = 23-28 lines in 2 locations

src/BounceMailHandler/BounceMailHandler.php 2 locations

@@ 796-818 (lines=23) @@
793
        $email = $header->fromaddress;
794
      }
795
796
      if ($this->testMode) {
797
        $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
798
      } else {
799
        // code below will use the Callback function, but return no value
800
        $params = array(
801
            $pos,
802
            $bounceType,
803
            $email,
804
            $subject,
805
            $header,
806
            $remove,
807
            $ruleNumber,
808
            $ruleCategory,
809
            $totalFetched,
810
            $body,
811
            $headerFull,
812
            $bodyFull,
813
            $status_code,
814
            $action,
815
            $diagnostic_code,
816
        );
817
        call_user_func_array($this->actionFunction, $params);
818
      }
819
    } else {
820
      // match rule, do bounce action
821
      if ($this->testMode) {
@@ 819-846 (lines=28) @@
816
        );
817
        call_user_func_array($this->actionFunction, $params);
818
      }
819
    } else {
820
      // match rule, do bounce action
821
      if ($this->testMode) {
822
        $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email);
823
824
        return true;
825
      } else {
826
        $params = array(
827
            $pos,
828
            $bounceType,
829
            $email,
830
            $subject,
831
            $xheader,
832
            $remove,
833
            $ruleNumber,
834
            $ruleCategory,
835
            $totalFetched,
836
            $body,
837
            $headerFull,
838
            $bodyFull,
839
            $status_code,
840
            $action,
841
            $diagnostic_code,
842
        );
843
844
        return call_user_func_array($this->actionFunction, $params);
845
      }
846
    }
847
848
    return false;
849
  }