@@ -57,10 +57,10 @@ public function enableTwoFactorAuthentication(Request $request)
5757 $ user ->is_two_factor_enabled = 1 ;
5858 $ user ->update ();
5959
60- if ($ request -> ajax ()) {
60+ if ($ request-> ajax ()) {
6161 return [
6262 'data ' => [
63- 'message ' => 'success ' ,
63+ 'message ' => 'success ' ,
6464 'description ' => '2FA Enabled ' ,
6565 ],
6666 ];
@@ -83,10 +83,10 @@ public function disableTwoFactorAuthentication(Request $request)
8383 $ user ->two_factor_secret_key = null ;
8484 $ user ->update ();
8585
86- if ($ request -> ajax ()) {
86+ if ($ request-> ajax ()) {
8787 return [
8888 'data ' => [
89- 'message ' => 'success ' ,
89+ 'message ' => 'success ' ,
9090 'description ' => '2FA Disabled ' ,
9191 ],
9292 ];
@@ -124,8 +124,7 @@ public function verifyTwoFactorAuthentication(Request $request)
124124 * @return string
125125 */
126126 private function base32EncodedString ($ length = 30 ):
127- string
128- {
127+ string {
129128 return Base32::encode ($ this ->strRandom ($ length ));
130129 }
131130
@@ -137,8 +136,7 @@ private function base32EncodedString($length = 30):
137136 * @return string
138137 */
139138 private function strRandom ($ length = 30 ):
140- string
141- {
139+ string {
142140 $ string = '' ;
143141
144142 while (($ len = strlen ($ string )) < $ length ) {
0 commit comments