Code Duplication    Length = 6-6 lines in 2 locations

typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php 2 locations

@@ 550-555 (lines=6) @@
547
    public function ext_getSearchKeys($arr, $depth_in, $searchString, $keyArray)
548
    {
549
        $keyArr = [];
550
        foreach ($arr as $key => $value) {
551
            $key = preg_replace('/\\.$/', '', $key);
552
            if (substr($key, -1) !== '.') {
553
                $keyArr[$key] = 1;
554
            }
555
        }
556
        if ($depth_in) {
557
            $depth_in = $depth_in . '.';
558
        }
@@ 634-639 (lines=6) @@
631
    public function ext_getTemplateHierarchyArr($arr, $depthData, $keyArray, $first = 0)
632
    {
633
        $keyArr = [];
634
        foreach ($arr as $key => $value) {
635
            $key = preg_replace('/\\.$/', '', $key);
636
            if (substr($key, -1) !== '.') {
637
                $keyArr[$key] = 1;
638
            }
639
        }
640
        $a = 0;
641
        $c = count($keyArr);
642
        /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */