Code Duplication    Length = 7-9 lines in 2 locations

manager/includes/src/Legacy/TemplateParser.php 2 locations

@@ 117-125 (lines=9) @@
114
                    foreach($_country_lang as $key => $value) {
115
                        $output .= '<option value="' . $key . '"' . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . '>' . $value . '</option>';
116
                    }
117
                } else {
118
                    if($data['elements']) {
119
                        $elements = explode('||', $data['elements']);
120
                        foreach($elements as $key => $value) {
121
                            $value = explode('==', $value);
122
                            $output .= '<option value="' . $value[1] . '">' . (isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]) . '</option>';
123
                        }
124
                    }
125
                }
126
                $output .= '</select>';
127
                $output .= $data['content'];
128
                $output .= '</div>';
@@ 152-158 (lines=7) @@
149
                $output .= '<label class="col-sm-3" for="[+name+]">[+lang.name+]</label>';
150
                $output .= '<div class="col-sm-7">';
151
                $output .= '<input type="radio" name="[+name+]" class="form-control" id="[+name+]" value="[+value+]" onChange="documentDirty=true;"[+readonly+] />';
152
                if($data['elements']) {
153
                    $elements = explode('||', $data['elements']);
154
                    foreach($elements as $key => $value) {
155
                        $value = explode('==', $value);
156
                        $output .= '<br /><input type="radio" name="[+name+]" class="form-control" id="[+name+]_' . $key . '" value="' . $value[1] . '" onChange="documentDirty=true;"[+readonly+] /> ' . (isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]);
157
                    }
158
                }
159
                $output .= $data['content'];
160
                $output .= '</div>';
161