Code Duplication    Length = 8-8 lines in 3 locations

class/BaseSmartObject.php 3 locations

@@ 270-277 (lines=8) @@
267
                $this->setControl($varname, 'yesno');
268
                break;
269
270
            case 'meta_keywords':
271
                $value = 'notdefined' !== $default ? $default : '';
272
                $this->initVar($varname, XOBJ_DTYPE_TXTAREA, $value, false, null, '', false, _CO_SOBJECT_META_KEYWORDS, _CO_SOBJECT_META_KEYWORDS_DSC, false, true, $displayOnForm);
273
                $this->setControl('meta_keywords', [
274
                    'name'        => 'textarea',
275
                    'form_editor' => 'textarea'
276
                ]);
277
                break;
278
279
            case 'meta_description':
280
                $value = 'notdefined' !== $default ? $default : '';
@@ 279-286 (lines=8) @@
276
                ]);
277
                break;
278
279
            case 'meta_description':
280
                $value = 'notdefined' !== $default ? $default : '';
281
                $this->initVar($varname, XOBJ_DTYPE_TXTAREA, $value, false, null, '', false, _CO_SOBJECT_META_DESCRIPTION, _CO_SOBJECT_META_DESCRIPTION_DSC, false, true, $displayOnForm);
282
                $this->setControl('meta_description', [
283
                    'name'        => 'textarea',
284
                    'form_editor' => 'textarea'
285
                ]);
286
                break;
287
288
            case 'short_url':
289
                $value = 'notdefined' !== $default ? $default : '';
@@ 307-314 (lines=8) @@
304
                $value = 'notdefined' !== $default ? $default : 0;
305
                $this->initVar($varname, XOBJ_DTYPE_INT, $value, false, null, '', false, _CO_SOBJECT_WEIGHT_FORM_CAPTION, '', true, true, $displayOnForm);
306
                break;
307
            case 'custom_css':
308
                $value = 'notdefined' !== $default ? $default : '';
309
                $this->initVar($varname, XOBJ_DTYPE_TXTAREA, $value, false, null, '', false, _CO_SOBJECT_CUSTOM_CSS, _CO_SOBJECT_CUSTOM_CSS_DSC, false, true, $displayOnForm);
310
                $this->setControl('custom_css', [
311
                    'name'        => 'textarea',
312
                    'form_editor' => 'textarea'
313
                ]);
314
                break;
315
        }
316
        $this->hideFieldFromSingleView($varname);
317
    }