Code Duplication    Length = 13-13 lines in 2 locations

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
}

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

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