Code Duplication    Length = 8-8 lines in 2 locations

class/class.datafieldmanager.php 2 locations

@@ 107-114 (lines=8) @@
104
            case 'yesno':
105
                $form->addElement(new XoopsFormRadioyn($title, $name, $value, _YES, _NO));
106
                break;
107
            case 'radio':
108
                $options_arr = explode('[|]', $options);
109
                $form_radio  = new XoopsFormRadio($title, $name, $value, 1);
110
                foreach ($options_arr as $option) {
111
                    $form_radio->addOption($option, $option);
112
                }
113
                $form->addElement($form_radio);
114
                break;
115
            case 'checkbox':
116
                $options_arr   = explode('[|]', $options);
117
                $form_checkbox = new XoopsFormCheckbox($title, $name, $value, 1);
@@ 115-122 (lines=8) @@
112
                }
113
                $form->addElement($form_radio);
114
                break;
115
            case 'checkbox':
116
                $options_arr   = explode('[|]', $options);
117
                $form_checkbox = new XoopsFormCheckbox($title, $name, $value, 1);
118
                foreach ($options_arr as $option) {
119
                    $form_checkbox->addOption($option, $option);
120
                }
121
                $form->addElement($form_checkbox);
122
                break;
123
            case 'select':
124
                $options_arr = explode('[|]', $options);
125
                $value_arr   = explode('[|]', $value);