Code Duplication    Length = 4-9 lines in 2 locations

www/app/model/PHPMailer/PHPMailer/PHPMailer.php 2 locations

@@ 1818-1826 (lines=9) @@
1815
1816
        foreach ($hosts as $hostentry) {
1817
            $hostinfo = [];
1818
            if (!preg_match(
1819
                '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/',
1820
                trim($hostentry),
1821
                $hostinfo
1822
            )) {
1823
                static::edebug($this->lang('connect_host') . ' ' . $hostentry);
1824
                // Not a valid host entry
1825
                continue;
1826
            }
1827
            // $hostinfo[2]: optional ssl or tls prefix
1828
            // $hostinfo[3]: the hostname
1829
            // $hostinfo[4]: optional port number
@@ 1834-1837 (lines=4) @@
1831
            // If it's not specified, the default value is used
1832
1833
            //Check the host name is a valid name or IP address before trying to use it
1834
            if (!static::isValidHost($hostinfo[3])) {
1835
                static::edebug($this->lang('connect_host') . ' ' . $hostentry);
1836
                continue;
1837
            }
1838
            $prefix = '';
1839
            $secure = $this->SMTPSecure;
1840
            $tls = ('tls' == $this->SMTPSecure);