Code Duplication    Length = 12-13 lines in 2 locations

typo3/sysext/core/Classes/Localization/Parser/AbstractXmlParser.php 1 location

@@ 120-131 (lines=12) @@
117
        } else {
118
            $validatedPrefix = '';
119
        }
120
        if ($validatedPrefix) {
121
            // Divide file reference into extension key, directory (if any) and base name:
122
            list($extensionKey, $file_extPath) = explode('/', substr($fileRef, strlen($validatedPrefix)), 2);
123
            $temp = GeneralUtility::revExplode('/', $file_extPath, 2);
124
            if (count($temp) === 1) {
125
                array_unshift($temp, '');
126
            }
127
            // Add empty first-entry if not there.
128
            list($file_extPath, $file_fileName) = $temp;
129
            // The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it.
130
            return PATH_site . 'typo3conf/l10n/' . $language . '/' . $extensionKey . '/' . ($file_extPath ? $file_extPath . '/' : '') . $language . '.' . $file_fileName;
131
        }
132
        return null;
133
    }
134

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

@@ 3365-3377 (lines=13) @@
3362
        } else {
3363
            $validatedPrefix = '';
3364
        }
3365
        if ($validatedPrefix) {
3366
            // Divide file reference into extension key, directory (if any) and base name:
3367
            list($file_extKey, $file_extPath) = explode('/', substr($fileRef, strlen($validatedPrefix)), 2);
3368
            $temp = self::revExplode('/', $file_extPath, 2);
3369
            if (count($temp) === 1) {
3370
                array_unshift($temp, '');
3371
            }
3372
            // Add empty first-entry if not there.
3373
            list($file_extPath, $file_fileName) = $temp;
3374
            // The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it.
3375
            $location = 'typo3conf/l10n/' . $language . '/' . $file_extKey . '/' . ($file_extPath ? $file_extPath . '/' : '');
3376
            return $location . $language . '.' . $file_fileName;
3377
        }
3378
        return null;
3379
    }
3380