Code Duplication    Length = 6-8 lines in 2 locations

typo3/sysext/form/Classes/Service/TranslationService.php 1 location

@@ 560-565 (lines=6) @@
557
                    }
558
                } elseif (is_array($labelValue)) {
559
                    $labelValue = $this->flattenTypoScriptLabelArray($labelValue, $labelKey);
560
                    foreach ($labelValue as $key => $value) {
561
                        $this->LOCAL_LANG[$languageKey][$key][0]['target'] = $value;
562
                        if ($value === '') {
563
                            $this->LOCAL_LANG_UNSET[$languageKey][$key] = '';
564
                        }
565
                    }
566
                }
567
            }
568
        }

typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php 1 location

@@ 1003-1010 (lines=8) @@
1000
                    $languageKey = substr($languageKey, 0, -1);
1001
                    // Don't process label if the language is not loaded
1002
                    if (is_array($languageArray) && isset($this->LOCAL_LANG[$languageKey])) {
1003
                        foreach ($languageArray as $labelKey => $labelValue) {
1004
                            if (!is_array($labelValue)) {
1005
                                $this->LOCAL_LANG[$languageKey][$labelKey][0]['target'] = $labelValue;
1006
                                if ($labelValue === '') {
1007
                                    $this->LOCAL_LANG_UNSET[$languageKey][$labelKey] = '';
1008
                                }
1009
                            }
1010
                        }
1011
                    }
1012
                }
1013
            }