Code Duplication    Length = 3-3 lines in 2 locations

src/Http/Middleware/AuthorizeControlPanel.php 1 location

@@ 43-45 (lines=3) @@
40
     */
41
    public function handle(Request $request, Closure $next)
42
    {
43
        if ($request->segment(1) !== 'admin' || in_array($request->path(), ['admin/login', 'admin/logout'])) {
44
            return $next($request);
45
        }
46
47
        if (!$this->authorizer->authorize('streams::control_panel.access')) {
48
            abort(403);

src/Http/Middleware/AuthorizeModuleAccess.php 1 location

@@ 53-55 (lines=3) @@
50
     */
51
    public function handle(Request $request, Closure $next)
52
    {
53
        if ($request->segment(1) !== 'admin' || in_array($request->path(), ['admin/login', 'admin/logout'])) {
54
            return $next($request);
55
        }
56
57
        $module = $this->modules->active();
58