Code Duplication    Length = 10-10 lines in 2 locations

app/Http/Controllers/ProjectController.php 2 locations

@@ 269-278 (lines=10) @@
266
     *
267
     * @return \Symfony\Component\HttpFoundation\Response
268
     */
269
    public function postAssign(Project $project, Request $request)
270
    {
271
        $status = false;
272
        if ($request->has('user_id')) {
273
            $project->assignUser((int) $request->input('user_id'));
274
            $status = true;
275
        }
276
277
        return response()->json(['status' => $status]);
278
    }
279
280
    /**
281
     * Ajax: remove user from the project.
@@ 288-297 (lines=10) @@
285
     *
286
     * @return \Symfony\Component\HttpFoundation\Response
287
     */
288
    public function postUnassign(Project $project, Request $request)
289
    {
290
        $status = false;
291
        if ($request->has('user_id')) {
292
            $project->unassignUser((int) $request->input('user_id'));
293
            $status = true;
294
        }
295
296
        return response()->json(['status' => $status]);
297
    }
298
299
    /**
300
     * To add a new note to the project.