Code Duplication    Length = 11-12 lines in 3 locations

system/modules/Migrations/objects/Parser/Object.php 1 location

@@ 96-107 (lines=12) @@
93
            }
94
95
            //check unparsed params
96
            foreach ($data as $key => $item) {
97
                //skip parsed and attribtes
98
                if ($key == '@attributes' || !empty($walked[$key])) {
99
                    continue;
100
                }
101
                $param = new \Migrations\Migration\Object\Param();
102
                $param->object_id = $this->object->id;
103
                $param->code = $key;
104
                $param->save();
105
                $className = get_class($this->object);
106
                $this->object = $className::get($this->object->id);
107
            }
108
            if ($model) {
109
                if ($this->object->delete_empty && @json_decode($this->object->delete_empty, true)) {
110
                    $deleteIf = json_decode($this->object->delete_empty, true);

system/modules/Migrations/objects/Parser/Object/Param.php 1 location

@@ 76-86 (lines=11) @@
73
            $this->model->{$objectParamValue['col']} = $objectParamValue['value'];
74
        }
75
        //check unparsed params
76
        foreach ($data as $key => $item) {
77
            //skip parsed and attribtes
78
            if ($key == '@attributes' || !empty($walked[$key])) {
79
                continue;
80
            }
81
            $param = new \Migrations\Migration\Object\Param();
82
            $param->parent_id = $this->param->id;
83
            $param->object_id = $this->object->object->id;
84
            $param->code = $key;
85
            $param->save();
86
        }
87
    }
88
89
    public function editor() {

system/modules/Migrations/objects/Parser/Object/ParamsList.php 1 location

@@ 47-58 (lines=12) @@
44
            $walked[$param->code] = true;
45
        }
46
        //check unparsed params
47
        foreach ($this->data as $key => $data) {
48
            //skip parsed and attribtes
49
            if ($key == '@attributes' || !empty($walked[$key])) {
50
                continue;
51
            }
52
            $param = new \Migrations\Migration\Object\Param();
53
            $param->parent_id = $this->param->id;
54
            $param->object_id = $this->object->object->id;
55
            $param->code = $key;
56
            $param->type = 'param';
57
            $param->save();
58
        }
59
    }
60
61
    public function editor() {