Code Duplication    Length = 11-11 lines in 3 locations

app/Http/Controllers/Auth/AuthController.php 1 location

@@ 75-85 (lines=11) @@
72
        ]);
73
    }
74
    
75
    public function prePostLogin(Request $request) {
76
        
77
        /**
78
         * Add recaptcha
79
         */
80
        if(env('RECAPTCHA_ENABLED') == 1){
81
            $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']);
82
        }
83
        
84
        return $this->postLogin($request);
85
    }
86
    
87
    
88
}

app/Http/Controllers/Auth/PasswordController.php 2 locations

@@ 34-44 (lines=11) @@
31
        $this->middleware('guest');
32
    }
33
    
34
    public function prePostEmail(Request $request){
35
        
36
        /**
37
         * Add recaptcha
38
         */
39
        if(env('RECAPTCHA_ENABLED') == 1){
40
            $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']);
41
        }
42
        
43
        return $this->postEmail($request);
44
    }
45
    
46
    public function prePostReset(Request $request){
47
        
@@ 46-56 (lines=11) @@
43
        return $this->postEmail($request);
44
    }
45
    
46
    public function prePostReset(Request $request){
47
        
48
        /**
49
         * Add recaptcha
50
         */
51
        if(env('RECAPTCHA_ENABLED') == 1){
52
            $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']);
53
        }
54
        
55
        return $this->postReset($request);
56
    }
57
    
58
}
59