Code Duplication    Length = 4-5 lines in 2 locations

IRI.php 2 locations

@@ 518-521 (lines=4) @@
515
516
                // Split authority into userinfo and host
517
                // (use last @ to ignore unescaped @ symbols)
518
                if (false !== ($pos = strrpos($authority, '@'))) {
519
                    $this->userinfo = substr($authority, 0, $pos);
520
                    $authority = substr($authority, $pos + 1);
521
                }
522
523
                // Split authority into host and port
524
                $hostEnd = 0;
@@ 583-587 (lines=5) @@
580
                    $input = substr($input, 3);
581
                }
582
583
                if (false !== ($end = strrpos($output, '/'))) {
584
                    $output = substr($output, 0, $end);
585
                } else {
586
                    $output = '';
587
                }
588
            } elseif (('..' === $input) || ('.' === $input)) {
589
                $input = '';
590
            } else {