Code Duplication    Length = 3-4 lines in 4 locations

typo3/sysext/workspaces/Classes/Service/GridDataService.php 1 location

@@ 544-546 (lines=3) @@
541
    {
542
        $fieldName = null;
543
544
        if (!(empty($GLOBALS['TCA'][$table]['ctrl']['enablecolumns'][$type]))) {
545
            $fieldName = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns'][$type];
546
        }
547
548
        return $fieldName;
549
    }

typo3/sysext/documentation/Classes/Domain/Repository/TableManualRepository.php 1 location

@@ 221-224 (lines=4) @@
218
        if (!empty($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['alttitle'])) {
219
            // If there's an alternative title, use it
220
            $fieldName = $GLOBALS['TCA_DESCR'][$key]['columns'][$field]['alttitle'];
221
        } elseif (!empty($GLOBALS['TCA'][$key]['columns'][$field])) {
222
            // Otherwise, if it's a table, use its title
223
            $fieldName = $GLOBALS['TCA'][$key]['columns'][$field]['label'];
224
        }
225
        return [$keyName, $fieldName];
226
    }
227

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

@@ 3669-3671 (lines=3) @@
3666
                            )
3667
                        ));
3668
                    }
3669
                    if (!empty($GLOBALS['TCA'][$table]['ctrl']['sortby'])) {
3670
                        $queryBuilder->orderBy($GLOBALS['TCA'][$table]['ctrl']['sortby'], 'DESC');
3671
                    }
3672
                    $queryBuilder->addOrderBy('uid');
3673
                    try {
3674
                        $result = $queryBuilder->execute();
@@ 4303-4305 (lines=3) @@
4300
     */
4301
    protected function copy_remapTranslationSourceField($table, $l10nRecords, $languageSourceMap)
4302
    {
4303
        if (empty($GLOBALS['TCA'][$table]['ctrl']['translationSource']) || empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'])) {
4304
            return;
4305
        }
4306
        $translationSourceFieldName = $GLOBALS['TCA'][$table]['ctrl']['translationSource'];
4307
        $translationParentFieldName = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
4308