Code Duplication    Length = 10-10 lines in 2 locations

app/Http/Controllers/ProjectController.php 2 locations

@@ 248-257 (lines=10) @@
245
     *
246
     * @return \Symfony\Component\HttpFoundation\Response
247
     */
248
    public function postAssign(Project $project, Request $request)
249
    {
250
        $status = false;
251
        if ($request->has('user_id')) {
252
            $project->assignUser((int) $request->input('user_id'));
253
            $status = true;
254
        }
255
256
        return response()->json(['status' => $status]);
257
    }
258
259
    /**
260
     * Ajax: remove user from the project.
@@ 267-276 (lines=10) @@
264
     *
265
     * @return \Symfony\Component\HttpFoundation\Response
266
     */
267
    public function postUnassign(Project $project, Request $request)
268
    {
269
        $status = false;
270
        if ($request->has('user_id')) {
271
            $project->unassignUser((int) $request->input('user_id'));
272
            $status = true;
273
        }
274
275
        return response()->json(['status' => $status]);
276
    }
277
278
    /**
279
     * To add a new note to the project.