Code Duplication    Length = 5-5 lines in 2 locations

system/objects/IdnaConvert.php 2 locations

@@ 326-330 (lines=5) @@
323
                    if ($k) {
324
                        $encoded = '';
325
                        $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin)));
326
                        if ($encoded) {
327
                            $output .= $encoded;
328
                        } else {
329
                            $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin)));
330
                        }
331
                        $output .= chr($decoded[$k]);
332
                    }
333
                    $last_begin = $k + 1;
@@ 342-346 (lines=5) @@
339
            $inp_len = sizeof($decoded);
340
            $encoded = '';
341
            $encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len)-$last_begin)));
342
            if ($encoded) {
343
                $output .= $encoded;
344
            } else {
345
                $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len)-$last_begin)));
346
            }
347
            return $output;
348
        } else {
349
            if ($output = $this->_encode($decoded)) {