Code Duplication    Length = 8-8 lines in 2 locations

src/Http/Api/IssueController.php 1 location

@@ 2724-2731 (lines=8) @@
2721
            $emsgs = array_filter($err_msgs);
2722
        }
2723
2724
        if ($emsgs)
2725
        {
2726
            return Response()->json([ 'ecode' => -11146, 'emsg' => $emsgs ]);
2727
        }
2728
        else
2729
        {
2730
            return Response()->json([ 'ecode' => 0, 'emsg' => '' ]);
2731
        }
2732
    }
2733
2734
    /**

src/Http/Api/UserController.php 1 location

@@ 59-66 (lines=8) @@
56
        }
57
58
        $user = Sentinel::authenticate([ 'email' => $email, 'password' => $password ]);
59
        if ($user)
60
        {
61
            return Response()->json([ 'ecode' => 0, 'data' => $user ]);
62
        }
63
        else
64
        {
65
            return Response()->json([ 'ecode' => -10000, 'data' => [] ]);
66
        }
67
    }
68
69
    /**