Code Duplication    Length = 3-3 lines in 2 locations

manager/includes/src/Core.php 2 locations

@@ 918-920 (lines=3) @@
915
        $suf = $this->config['friendly_url_suffix'];
916
        $pre = preg_quote($pre, '/');
917
        $suf = preg_quote($suf, '/');
918
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
919
            $q = $_[1];
920
        }
921
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
922
            $q = $_[1];
923
        }
@@ 921-923 (lines=3) @@
918
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
919
            $q = $_[1];
920
        }
921
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
922
            $q = $_[1];
923
        }
924
925
        /* First remove any / before or after */
926
        $q = trim($q, '/');