Code Duplication    Length = 3-3 lines in 2 locations

src/Control/Director.php 2 locations

@@ 628-630 (lines=3) @@
625
                return "";
626
            }
627
628
            if (substr($urlWithoutProtocol, 0, strlen($baseDomain)) == $baseDomain) {
629
                return substr($urlWithoutProtocol, strlen($baseDomain));
630
            }
631
        }
632
633
        // test for base folder, e.g. /var/www
@@ 646-648 (lines=3) @@
643
        }
644
645
        // Test for relative base url, e.g mywebsite/ if the full url is localhost/myswebsite
646
        if (substr($url, 0, strlen($baseDomain)) == $baseDomain) {
647
            return substr($url, strlen($baseDomain));
648
        }
649
650
        // Nothing matched, fall back to returning the original URL
651
        return $url;