Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 44-52 (lines=9) @@
41
        return true;
42
    }
43
44
    public function parseRequest($request) {
45
        $colName = empty($this->colParams['col']) ? $this->colName : $this->colParams['col'];
46
        if (isset($request[$this->colName])) {
47
            $this->activeForm->model->{$colName} = $request[$this->colName];
48
        } else {
49
            $this->activeForm->model->{$colName} = 0;
50
            $this->activeForm->model->{$colName} = '';
51
        }
52
    }
53
54
    public function value() {
55
        $value = isset($this->colParams['default']) ? $this->colParams['default'] : '';

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

@@ 16-24 (lines=9) @@
13
14
class Map extends \Ui\ActiveForm\Input {
15
16
    public function parseRequest($request) {
17
        $colName = empty($this->colParams['col']) ? $this->colName : $this->colParams['col'];
18
        if (isset($request[$this->colName])) {
19
            $this->activeForm->model->{$colName} = json_encode($request[$this->colName]);
20
        } else {
21
            $this->activeForm->model->{$colName} = 0;
22
            $this->activeForm->model->{$colName} = '';
23
        }
24
    }
25
26
}
27