Code Duplication    Length = 10-10 lines in 2 locations

app/Http/Controllers/ProjectController.php 2 locations

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