Code Duplication    Length = 6-6 lines in 2 locations

class/BaseSmartObject.php 2 locations

@@ 154-159 (lines=6) @@
151
            trigger_error("Cannot use variable starting with 'url_'.");
152
        }
153
        parent::initVar($key, $data_type, $value, $required, $maxlength, $options);
154
        if ($this->handler && (!$form_caption || '' === $form_caption)) {
155
            $dyn_form_caption = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key);
156
            if (defined($dyn_form_caption)) {
157
                $form_caption = constant($dyn_form_caption);
158
            }
159
        }
160
        if ($this->handler && (!$form_dsc || '' === $form_dsc)) {
161
            $dyn_form_dsc = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key . '_DSC');
162
            if (defined($dyn_form_dsc)) {
@@ 160-165 (lines=6) @@
157
                $form_caption = constant($dyn_form_caption);
158
            }
159
        }
160
        if ($this->handler && (!$form_dsc || '' === $form_dsc)) {
161
            $dyn_form_dsc = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key . '_DSC');
162
            if (defined($dyn_form_dsc)) {
163
                $form_dsc = constant($dyn_form_dsc);
164
            }
165
        }
166
167
        $this->vars[$key] = array_merge($this->vars[$key], [
168
            'multilingual'        => $multilingual,