Code Duplication    Length = 5-5 lines in 2 locations

src/BounceMailHandler/BounceMailHandler.php 2 locations

@@ 560-564 (lines=5) @@
557
            $dsnMsg = \imap_fetchbody($this->mailboxLink, $pos, '1');
558
            $dsnMsgStructure = \imap_bodystruct($this->mailboxLink, $pos, '1');
559
560
            if ($dsnMsgStructure->encoding == 4) {
561
                $dsnMsg = \quoted_printable_decode($dsnMsg);
562
            } elseif ($dsnMsgStructure->encoding == 3) {
563
                $dsnMsg = \base64_decode($dsnMsg, true);
564
            }
565
566
            // second part of DSN (Delivery Status Notification), delivery-status
567
            $dsnReport = \imap_fetchbody($this->mailboxLink, $pos, '2');
@@ 606-610 (lines=5) @@
603
                case 2: // Content-type = message
604
                    $body = \imap_body($this->mailboxLink, $pos);
605
606
                    if ($structure->encoding == 4) {
607
                        $body = \quoted_printable_decode($body);
608
                    } elseif ($structure->encoding == 3) {
609
                        $body = \base64_decode($body, true);
610
                    }
611
612
                    $body = \substr($body, 0, 1000);
613
                    $result = bmhBodyRules($body, $structure, $this->debugBodyRule);