Code Duplication    Length = 18-18 lines in 2 locations

src/Models/BitrixModel.php 1 location

@@ 126-143 (lines=18) @@
123
     *
124
     * @return void
125
     */
126
    public function fill($fields)
127
    {
128
        if (!is_array($fields)) {
129
            return;
130
        }
131
132
        if (isset($fields['ID'])) {
133
            $this->id = $fields['ID'];
134
        }
135
136
        $this->fields = $fields;
137
138
        $this->fieldsAreFetched = true;
139
140
        if (method_exists($this, 'afterFill')) {
141
            $this->afterFill();
142
        }
143
    }
144
145
    /**
146
     * Activate model.

src/Models/HLModel.php 1 location

@@ 128-145 (lines=18) @@
125
     *
126
     * @return void
127
     */
128
    public function fill($fields)
129
    {
130
        if (!is_array($fields)) {
131
            return;
132
        }
133
134
        if (isset($fields['ID'])) {
135
            $this->id = $fields['ID'];
136
        }
137
138
        $this->fields = $fields;
139
140
        $this->fieldsAreFetched = true;
141
142
        if (method_exists($this, 'afterFill')) {
143
            $this->afterFill();
144
        }
145
    }
146
147
148
    /**