Code Duplication    Length = 9-9 lines in 2 locations

src/Http/Kernel.php 2 locations

@@ 142-150 (lines=9) @@
139
140
        $uri = array_get($_SERVER, 'REQUEST_URI', filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL));
141
142
        if (($hint === 'uri' || $hint === true) && preg_match($pattern, $uri, $matches)) {
143
144
            $_SERVER['ORIGINAL_REQUEST_URI'] = $uri;
145
            $_SERVER['REQUEST_URI']          = preg_replace($pattern, '/', $uri);
146
147
            define('LOCALE', $matches[1]);
148
149
            return;
150
        }
151
152
        /*
153
         * Check if we're on the home page.
@@ 159-167 (lines=9) @@
156
157
        $uri = array_get($_SERVER, 'REQUEST_URI', filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL));
158
159
        if (($hint === 'uri' || $hint === true) && preg_match($pattern, $uri, $matches)) {
160
161
            $_SERVER['ORIGINAL_REQUEST_URI'] = $uri;
162
            $_SERVER['REQUEST_URI']          = preg_replace($pattern, '/', $uri);
163
164
            define('LOCALE', $matches[1]);
165
166
            return;
167
        }
168
    }
169
}
170