Code Duplication    Length = 11-11 lines in 2 locations

typo3/sysext/core/Classes/DataHandling/DataHandler.php 2 locations

@@ 4266-4276 (lines=11) @@
4263
        if (is_array($l10nRecords)) {
4264
            $localizedDestPids = [];
4265
            // If $destPid < 0, then it is the uid of the original language record we are inserting after
4266
            if ($destPid < 0) {
4267
                // Get the localized records of the record we are inserting after
4268
                $queryBuilder->setParameter('pointer', abs($destPid), \PDO::PARAM_INT);
4269
                $destL10nRecords = $queryBuilder->execute()->fetchAll();
4270
                // Index the localized record uids by language
4271
                if (is_array($destL10nRecords)) {
4272
                    foreach ($destL10nRecords as $record) {
4273
                        $localizedDestPids[$record[$GLOBALS['TCA'][$table]['ctrl']['languageField']]] = -$record['uid'];
4274
                    }
4275
                }
4276
            }
4277
            $languageSourceMap = [
4278
                $uid => $overrideValues[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]
4279
            ];
@@ 4683-4693 (lines=11) @@
4680
        if (is_array($l10nRecords)) {
4681
            $localizedDestPids = [];
4682
            // If $$originalRecordDestinationPid < 0, then it is the uid of the original language record we are inserting after
4683
            if ($originalRecordDestinationPid < 0) {
4684
                // Get the localized records of the record we are inserting after
4685
                $queryBuilder->setParameter('pointer', abs($originalRecordDestinationPid), \PDO::PARAM_INT);
4686
                $destL10nRecords = $queryBuilder->execute()->fetchAll();
4687
                // Index the localized record uids by language
4688
                if (is_array($destL10nRecords)) {
4689
                    foreach ($destL10nRecords as $record) {
4690
                        $localizedDestPids[$record[$GLOBALS['TCA'][$table]['ctrl']['languageField']]] = -$record['uid'];
4691
                    }
4692
                }
4693
            }
4694
            // Move the localized records after the corresponding localizations of the destination record
4695
            foreach ($l10nRecords as $record) {
4696
                $localizedDestPid = (int)$localizedDestPids[$record[$GLOBALS['TCA'][$table]['ctrl']['languageField']]];