Code Duplication    Length = 6-6 lines in 2 locations

class/BaseSmartObject.php 2 locations

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