Code Duplication    Length = 3-5 lines in 2 locations

typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php 2 locations

@@ 545-549 (lines=5) @@
542
    protected function removeItemsByKeepItemsPageTsConfig(array $result, $fieldName, array $items)
543
    {
544
        $table = $result['tableName'];
545
        if (!isset($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.']['keepItems'])
546
            || !is_string($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.']['keepItems'])
547
        ) {
548
            return $items;
549
        }
550
551
        // If keepItems is set but is an empty list all current items get removed
552
        if ($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.']['keepItems'] === '') {
@@ 1104-1106 (lines=3) @@
1101
            }
1102
1103
            $pageTsConfigId = 0;
1104
            if ($result['pageTsConfig']['TCEFORM.'][$localTable . '.'][$localFieldName . '.']['PAGE_TSCONFIG_ID']) {
1105
                $pageTsConfigId = (int)$result['pageTsConfig']['TCEFORM.'][$localTable . '.'][$localFieldName . '.']['PAGE_TSCONFIG_ID'];
1106
            }
1107
1108
            $pageTsConfigIdList = 0;
1109
            if ($result['pageTsConfig']['TCEFORM.'][$localTable . '.'][$localFieldName . '.']['PAGE_TSCONFIG_IDLIST']) {