Code Duplication    Length = 6-8 lines in 2 locations

typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php 1 location

@@ 1372-1379 (lines=8) @@
1369
                $cachedContent = $cache->get($hash);
1370
                if (is_array($cachedContent) && !$this->userTS_dontGetCached) {
1371
                    $this->userTS = $cachedContent;
1372
                } else {
1373
                    $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
1374
                    $parseObj->parse($this->userTS_text);
1375
                    $this->userTS = $parseObj->setup;
1376
                    $cache->set($hash, $this->userTS, ['ident_BE_USER_TSconfig'], 0);
1377
                    // Update UC:
1378
                    $this->userTSUpdated = true;
1379
                }
1380
            }
1381
            // Processing webmounts
1382
            // Admin's always have the root mounted

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

@@ 3869-3874 (lines=6) @@
3866
            $identifier = md5('pageTS:' . $userTS);
3867
            $contentHashCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
3868
            $this->pagesTSconfig = $contentHashCache->get($identifier);
3869
            if (!is_array($this->pagesTSconfig)) {
3870
                $parseObj = GeneralUtility::makeInstance(TypoScriptParser::class);
3871
                $parseObj->parse($userTS);
3872
                $this->pagesTSconfig = $parseObj->setup;
3873
                $contentHashCache->set($identifier, $this->pagesTSconfig, ['PAGES_TSconfig'], 0);
3874
            }
3875
        }
3876
        return $this->pagesTSconfig;
3877
    }