Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 3305-3309 (lines=5) @@
3302
                        $pasteUpdate = $value['update'];
3303
                        $value = $value['target'];
3304
                    }
3305
                    foreach ($hookObjectsArr as $hookObj) {
3306
                        if (method_exists($hookObj, 'processCmdmap_preProcess')) {
3307
                            $hookObj->processCmdmap_preProcess($command, $table, $id, $value, $this, $pasteUpdate);
3308
                        }
3309
                    }
3310
                    // Init copyMapping array:
3311
                    // Must clear this array before call from here to those functions:
3312
                    // Contains mapping information between new and old id numbers.
@@ 3316-3320 (lines=5) @@
3313
                    $this->copyMappingArray = [];
3314
                    // process the command
3315
                    $commandIsProcessed = false;
3316
                    foreach ($hookObjectsArr as $hookObj) {
3317
                        if (method_exists($hookObj, 'processCmdmap')) {
3318
                            $hookObj->processCmdmap($command, $table, $id, $value, $commandIsProcessed, $this, $pasteUpdate);
3319
                        }
3320
                    }
3321
                    // Only execute default commands if a hook hasn't been processed the command already
3322
                    if (!$commandIsProcessed) {
3323
                        $procId = $id;
@@ 3361-3365 (lines=5) @@
3358
                            $pasteDatamap[$table][$procId] = $pasteUpdate;
3359
                        }
3360
                    }
3361
                    foreach ($hookObjectsArr as $hookObj) {
3362
                        if (method_exists($hookObj, 'processCmdmap_postProcess')) {
3363
                            $hookObj->processCmdmap_postProcess($command, $table, $id, $value, $this, $pasteUpdate, $pasteDatamap);
3364
                        }
3365
                    }
3366
                    // Merging the copy-array info together for remapping purposes.
3367
                    ArrayUtility::mergeRecursiveWithOverrule($this->copyMappingArray_merged, $this->copyMappingArray);
3368
                }