Code Duplication    Length = 7-11 lines in 4 locations

typo3/sysext/core/Classes/Html/HtmlParser.php 3 locations

@@ 911-921 (lines=11) @@
908
            }
909
        }
910
        // LocalNesting
911
        if ($TSconfig['localNesting']) {
912
            $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['localNesting']), true);
913
            foreach ($lN as $tn) {
914
                if (isset($keepTags[$tn])) {
915
                    if (!is_array($keepTags[$tn])) {
916
                        $keepTags[$tn] = [];
917
                    }
918
                    $keepTags[$tn]['nesting'] = 1;
919
                }
920
            }
921
        }
922
        if ($TSconfig['globalNesting']) {
923
            $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['globalNesting']), true);
924
            foreach ($lN as $tn) {
@@ 922-932 (lines=11) @@
919
                }
920
            }
921
        }
922
        if ($TSconfig['globalNesting']) {
923
            $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['globalNesting']), true);
924
            foreach ($lN as $tn) {
925
                if (isset($keepTags[$tn])) {
926
                    if (!is_array($keepTags[$tn])) {
927
                        $keepTags[$tn] = [];
928
                    }
929
                    $keepTags[$tn]['nesting'] = 'global';
930
                }
931
            }
932
        }
933
        if ($TSconfig['rmTagIfNoAttrib']) {
934
            $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['rmTagIfNoAttrib']), true);
935
            foreach ($lN as $tn) {
@@ 947-957 (lines=11) @@
944
                }
945
            }
946
        }
947
        if ($TSconfig['noAttrib']) {
948
            $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['noAttrib']), true);
949
            foreach ($lN as $tn) {
950
                if (isset($keepTags[$tn])) {
951
                    if (!is_array($keepTags[$tn])) {
952
                        $keepTags[$tn] = [];
953
                    }
954
                    $keepTags[$tn]['allowedAttribs'] = 0;
955
                }
956
            }
957
        }
958
        if ($TSconfig['removeTags']) {
959
            $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['removeTags']), true);
960
            foreach ($lN as $tn) {

typo3/sysext/backend/Classes/Utility/BackendUtility.php 1 location

@@ 652-658 (lines=7) @@
649
650
            // Add subtype fields e.g. for a valid RTE transformation
651
            // The RTE runs the DB -> RTE transformation only, if the RTE field is part of the getTCAtypes array
652
            if (isset($typesConf['subtype_value_field'])) {
653
                $subType = $rec[$typesConf['subtype_value_field']];
654
                if (isset($typesConf['subtypes_addlist'][$subType])) {
655
                    $subFields = GeneralUtility::trimExplode(',', $typesConf['subtypes_addlist'][$subType], true);
656
                    $fieldList = array_merge($fieldList, $subFields);
657
                }
658
            }
659
660
            // Add palette fields e.g. for a valid RTE transformation
661
            $paletteFieldList = [];