Code Duplication    Length = 7-7 lines in 2 locations

catalog/includes/OSC/OM/HTML.php 2 locations

@@ 130-136 (lines=7) @@
127
    {
128
        $field = '<input type="' . static::output($type) . '" name="' . static::output($name) . '"';
129
130
        if (($reinsert_value == true) && ((isset($_GET[$name]) && is_string($_GET[$name])) || (isset($_POST[$name]) && is_string($_POST[$name])))) {
131
            if (isset($_GET[$name]) && is_string($_GET[$name])) {
132
                $value = $_GET[$name];
133
            } elseif (isset($_POST[$name]) && is_string($_POST[$name])) {
134
                $value = $_POST[$name];
135
            }
136
        }
137
138
        if (strlen($value) > 0) {
139
            $field .= ' value="' . static::output($value) . '"';
@@ 249-255 (lines=7) @@
246
            $field .= '<option value="">' . OSCOM::getDef('pull_down_default') . '</option>';
247
        }
248
249
        if (empty($default) && ((isset($_GET[$name]) && is_string($_GET[$name])) || (isset($_POST[$name]) && is_string($_POST[$name])))) {
250
            if (isset($_GET[$name]) && is_string($_GET[$name])) {
251
                $default = $_GET[$name];
252
            } elseif (isset($_POST[$name]) && is_string($_POST[$name])) {
253
                $default = $_POST[$name];
254
            }
255
        }
256
257
        $ci = new \CachingIterator(new \ArrayIterator($values), \CachingIterator::TOSTRING_USE_CURRENT); // used for hasNext() below
258