Code Duplication    Length = 6-6 lines in 2 locations

system/objects/IdnaConvert.php 2 locations

@@ 205-210 (lines=6) @@
202
            }
203
            list ($email_pref, $input) = explode('@', $input, 2);
204
            $arr = explode('.', $input);
205
            foreach ($arr as $k => $v) {
206
                if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) {
207
                    $conv = $this->_decode($v);
208
                    if ($conv) $arr[$k] = $conv;
209
                }
210
            }
211
            $input = join('.', $arr);
212
            $arr = explode('.', $email_pref);
213
            foreach ($arr as $k => $v) {
@@ 213-218 (lines=6) @@
210
            }
211
            $input = join('.', $arr);
212
            $arr = explode('.', $email_pref);
213
            foreach ($arr as $k => $v) {
214
                if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) {
215
                    $conv = $this->_decode($v);
216
                    if ($conv) $arr[$k] = $conv;
217
                }
218
            }
219
            $email_pref = join('.', $arr);
220
            $return = $email_pref . '@' . $input;
221
        } elseif (preg_match('![:\./]!', $input)) { // Or a complete domain name (with or without paths / parameters)