Code Duplication    Length = 17-18 lines in 2 locations

htdocs/class/xoopsform/form.php 2 locations

@@ 156-173 (lines=18) @@
153
        }
154
155
        switch ($hashinfo) {
156
            case 'md5':
157
158
                @$var['name'] = md5(get_class($object));
159
160
                foreach (get_object_vars($object) as $key => $value) {
161
                    if ($key !== '_objid') {
162
                        @$var['value'] = $this->getArrayID($value, $key, $var['value'], $hashinfo);
163
                    }
164
                }
165
166
                foreach (get_class_methods($object) as $key => $value) {
167
                    @$var['func'] = $this->getArrayID($value, $key, $var['func'], $hashinfo);
168
                }
169
170
                @$this->_objid = md5($var['name'] . ':' . $var['func'] . ':' . $var['value']);
171
172
                return $this->_objid;
173
                break;
174
175
            default:
176
@@ 175-191 (lines=17) @@
172
                return $this->_objid;
173
                break;
174
175
            default:
176
177
                @$var['name'] = sha1(get_class($object));
178
179
                foreach (get_object_vars($object) as $key => $value) {
180
                    if ($key !== '_objid') {
181
                        @$var['value'] = $this->getArrayID($value, $key, $var['value'], $hashinfo);
182
                    }
183
                }
184
185
                foreach (get_class_methods($object) as $key => $value) {
186
                    @$var['func'] = $this->getArrayID($value, $key, $var['func'], $hashinfo);
187
                }
188
189
                @$this->_objid = sha1($var['name'] . ':' . $var['func'] . ':' . $var['value']);
190
191
                return $this->_objid;
192
193
        }
194
    }