Code Duplication    Length = 5-7 lines in 2 locations

src/Exception/ExceptionHandler.php 2 locations

@@ 48-54 (lines=7) @@
45
         *
46
         * @todo: Clean up
47
         */
48
        if ($e instanceof AuthenticationException) {
49
            if ($request->segment(1) === 'admin') {
50
                return redirect()->guest('admin/login');
51
            } else {
52
                return redirect()->guest('login');
53
            }
54
        }
55
56
        return parent::render($request, $e);
57
    }
@@ 72-76 (lines=5) @@
69
            return response()->json(['error' => 'Unauthenticated.'], 401);
70
        }
71
72
        if ($request->segment(1) === 'admin') {
73
            return redirect()->guest('admin/login');
74
        } else {
75
            return redirect()->guest('login');
76
        }
77
    }
78
}
79