Code Duplication    Length = 11-11 lines in 2 locations

app/Repository/Traits/User/CrudTrait.php 1 location

@@ 112-122 (lines=11) @@
109
     *
110
     * @param array $input
111
     */
112
    public function updateMessagesSettings(array $input)
113
    {
114
        return (new Project\User())
115
            ->where('user_id', '=', $this->id)
116
            ->whereIn('project_id', array_keys($input))
117
            ->get()
118
            ->each(function (Project\User $project) use ($input) {
119
                $project->message_id = $input[$project->project_id];
120
                $project->save();
121
            });
122
    }
123
124
    /**
125
     * Fill the model with an array of attributes.

app/Repository/User/UpdaterRepository.php 1 location

@@ 96-106 (lines=11) @@
93
     *
94
     * @param array $input
95
     */
96
    public function updateMessagesSettings(array $input)
97
    {
98
        return (new ProjectUser())
99
            ->where('user_id', '=', $this->model->id)
100
            ->whereIn('project_id', array_keys($input))
101
            ->get()
102
            ->each(function (ProjectUser $project) use ($input) {
103
                $project->message_id = $input[$project->project_id];
104
                $project->save();
105
            });
106
    }
107
}
108