Code Duplication    Length = 3-5 lines in 2 locations

htdocs/modules/profile/class/field.php 2 locations

@@ 273-277 (lines=5) @@
270
            case "select":
271
            case "radio":
272
                $options = $this->getVar('field_options');
273
                if (isset($options[$value])) {
274
                    $value = htmlspecialchars(defined($options[$value]) ? constant($options[$value]) : $options[$value]);
275
                } else {
276
                    $value = "";
277
                }
278
279
                return $value;
280
                break;
@@ 288-290 (lines=3) @@
285
                $ret     = array();
286
                if (count($options) > 0) {
287
                    foreach (array_keys($options) as $key) {
288
                        if (in_array($key, $value)) {
289
                            $ret[$key] = htmlspecialchars(defined($options[$key]) ? constant($options[$key]) : $options[$key]);
290
                        }
291
                    }
292
                }
293