Code Duplication    Length = 3-3 lines in 2 locations

manager/includes/src/Core.php 2 locations

@@ 944-946 (lines=3) @@
941
        $suf = $this->config['friendly_url_suffix'];
942
        $pre = preg_quote($pre, '/');
943
        $suf = preg_quote($suf, '/');
944
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
945
            $q = $_[1];
946
        }
947
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
948
            $q = $_[1];
949
        }
@@ 947-949 (lines=3) @@
944
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
945
            $q = $_[1];
946
        }
947
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
948
            $q = $_[1];
949
        }
950
951
        /* First remove any / before or after */
952
        $q = trim($q, '/');