Code Duplication    Length = 4-4 lines in 3 locations

include/preferences.inc.php 3 locations

@@ 137-140 (lines=4) @@
134
                    require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
135
                    $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true);
136
                    break;
137
                case 'password':
138
                    $myts = MyTextSanitizer::getInstance();
139
                    $ele  = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
140
                    break;
141
                case 'color':
142
                    $myts = MyTextSanitizer::getInstance();
143
                    $ele  = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
@@ 141-144 (lines=4) @@
138
                    $myts = MyTextSanitizer::getInstance();
139
                    $ele  = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
140
                    break;
141
                case 'color':
142
                    $myts = MyTextSanitizer::getInstance();
143
                    $ele  = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
144
                    break;
145
                case 'textbox':
146
                default:
147
                    $myts = MyTextSanitizer::getInstance();
@@ 146-149 (lines=4) @@
143
                    $ele  = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
144
                    break;
145
                case 'textbox':
146
                default:
147
                    $myts = MyTextSanitizer::getInstance();
148
                    $ele  = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
149
                    break;
150
            }
151
            $hidden   = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
152
            $ele_tray = new XoopsFormElementTray($title4tray, '');