Code Duplication    Length = 5-6 lines in 2 locations

typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 1 location

@@ 1991-1995 (lines=5) @@
1988
            // parse_url could return an array without the key "host", the empty check works better than strict check
1989
            if (empty($url_parts['host'])) {
1990
                $url_parts['host'] = GeneralUtility::getIndpEnv('HTTP_HOST');
1991
                if ($code[0] === '/') {
1992
                    $code = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . $code;
1993
                } else {
1994
                    $code = GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $code;
1995
                }
1996
                $checkBaseTag = false;
1997
            } else {
1998
                $checkBaseTag = true;

typo3/sysext/core/Classes/Utility/GeneralUtility.php 1 location

@@ 2369-2374 (lines=6) @@
2366
    {
2367
        $uI = parse_url($path);
2368
        // relative to HOST
2369
        if ($path[0] === '/') {
2370
            $path = self::getIndpEnv('TYPO3_REQUEST_HOST') . $path;
2371
        } elseif (!$uI['scheme']) {
2372
            // No scheme either
2373
            $path = self::getIndpEnv('TYPO3_REQUEST_DIR') . $path;
2374
        }
2375
        return $path;
2376
    }
2377