Code Duplication    Length = 13-13 lines in 2 locations

app/Repository/Message/Queue/UpdaterRepository.php 1 location

@@ 110-122 (lines=13) @@
107
     *
108
     * @return array
109
     */
110
    protected function getFillAttributes($name, Model $model, $changeBy, array $payload)
111
    {
112
        $changeById = (int) ($changeBy instanceof UserInterface ? $changeBy->id : $changeBy);
113
114
        $fill                 = [];
115
        $fill['event']        = $name;
116
        $fill['payload']      = $payload;
117
        $fill['model_type']   = get_class($model);
118
        $fill['model_id']     = $model->id;
119
        $fill['change_by_id'] = $changeById;
120
121
        return $fill;
122
    }
123
}
124

app/Repository/Traits/Message/Queue/CrudTrait.php 1 location

@@ 114-126 (lines=13) @@
111
     *
112
     * @return array
113
     */
114
    protected function getFillAttributes($name, Model $model, $changeBy, array $payload)
115
    {
116
        $changeById =  (int) ($changeBy instanceof User ? $changeBy->id : $changeBy);
117
118
        $fill                 = [];
119
        $fill['event']        = $name;
120
        $fill['payload']      = $payload;
121
        $fill['model_type']   = get_class($model);
122
        $fill['model_id']     = $model->id;
123
        $fill['change_by_id'] = $changeById;
124
125
        return $fill;
126
    }
127
128
    abstract public function fill(array $attributes);
129
}