Code Duplication    Length = 23-28 lines in 2 locations

src/BounceMailHandler/BounceMailHandler.php 2 locations

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