Code Duplication    Length = 12-12 lines in 2 locations

src/Models/BitrixModel.php 1 location

@@ 105-116 (lines=12) @@
102
     *
103
     * @return array
104
     */
105
    public function refreshFields()
106
    {
107
        if ($this->id === null) {
108
            return $this->fields = [];
109
        }
110
        
111
        $this->fields = static::query()->getById($this->id)->fields;
112
        
113
        $this->fieldsAreFetched = true;
114
        
115
        return $this->fields;
116
    }
117
118
    /**
119
     * Fill model fields if they are already known.

src/Models/HLModel.php 1 location

@@ 107-118 (lines=12) @@
104
     *
105
     * @return array
106
     */
107
    public function refreshFields()
108
    {
109
        if ($this->id === null) {
110
            return $this->fields = [];
111
        }
112
113
        $this->fields = static::query()->getById($this->id)->fields;
114
115
        $this->fieldsAreFetched = true;
116
117
        return $this->fields;
118
    }
119
120
    /**
121
     * Fill model fields if they are already known.