Code Duplication    Length = 6-6 lines in 2 locations

system/modules/Ui/objects/ActiveForm/Input/Search.php 1 location

@@ 32-37 (lines=6) @@
29
            $inputOptions['values'][$this->value()] = $relation['model']::get($inputOptions['value']);
30
        }
31
32
        if (!empty($inputOptions['values'][$this->activeForm->model->{$this->colName}]) &&
33
                is_array($inputOptions['values'][$this->activeForm->model->{$this->colName}]) &&
34
                !empty($inputOptions['values'][$this->activeForm->model->{$this->colName}]['input'])) {
35
            $aditionalCol = $inputOptions['values'][$this->activeForm->model->{$this->colName}]['input']['name'];
36
            $inputOptions['aditionalValue'] = $this->activeForm->model->$aditionalCol;
37
        }
38
39
        $preset = $this->preset();
40

system/modules/Ui/objects/ActiveForm/Input/Select.php 1 location

@@ 47-52 (lines=6) @@
44
          . 'return function(data,modal){inji.Ui.forms.submitAjax($(elem).closest(\'form\')[0], {notSave: true});}}(this))'
45
      ];
46
    }
47
    if (!empty($inputOptions['values'][$this->activeForm->model->{$this->colName}]) &&
48
            is_array($inputOptions['values'][$this->activeForm->model->{$this->colName}]) &&
49
            !empty($inputOptions['values'][$this->activeForm->model->{$this->colName}]['input'])) {
50
      $aditionalCol = $inputOptions['values'][$this->activeForm->model->{$this->colName}]['input']['name'];
51
      $inputOptions['aditionalValue'] = $this->activeForm->model->$aditionalCol;
52
    }
53
54
    $preset = $this->preset();
55