Code Duplication    Length = 8-8 lines in 2 locations

class/Form/SmartObjectForm.php 2 locations

@@ 383-390 (lines=8) @@
380
    public function getControl($controlName, $key)
381
    {
382
        switch ($controlName) {
383
            case 'check':
384
//                require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php';
385
                $control    = $this->targetObject->getControl($key);
386
                $controlObj = new SmartFormCheckElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getVar($key));
387
                $controlObj->addOptionArray($control['options']);
388
389
                return $controlObj;
390
                break;
391
392
            case 'color':
393
                $control    = $this->targetObject->getControl($key);
@@ 399-406 (lines=8) @@
396
                return $controlObj;
397
                break;
398
399
            case 'radio':
400
                $control = $this->targetObject->getControl($key);
401
402
                $controlObj = new \XoopsFormRadio($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getVar($key));
403
                $controlObj->addOptionArray($control['options']);
404
405
                return $controlObj;
406
                break;
407
408
            case 'label':
409
                return new \XoopsFormLabel($this->targetObject->vars[$key]['form_caption'], $this->targetObject->getVar($key));