Code Duplication    Length = 10-10 lines in 2 locations

app/Http/Controllers/ProjectController.php 2 locations

@@ 276-285 (lines=10) @@
273
     *
274
     * @return \Symfony\Component\HttpFoundation\Response
275
     */
276
    public function postAssign(Project $project, Request $request)
277
    {
278
        $status = false;
279
        if ($request->has('user_id')) {
280
            $project->assignUser((int) $request->input('user_id'));
281
            $status = true;
282
        }
283
284
        return response()->json(['status' => $status]);
285
    }
286
287
    /**
288
     * Ajax: remove user from the project.
@@ 295-304 (lines=10) @@
292
     *
293
     * @return \Symfony\Component\HttpFoundation\Response
294
     */
295
    public function postUnassign(Project $project, Request $request)
296
    {
297
        $status = false;
298
        if ($request->has('user_id')) {
299
            $project->unassignUser((int) $request->input('user_id'));
300
            $status = true;
301
        }
302
303
        return response()->json(['status' => $status]);
304
    }
305
306
    /**
307
     * To add a new note to the project.