chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -128,10 +128,41 @@ class LoginController extends Controller
$this->sendFailedLoginResponse($request);
}
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return $this->username;
}
/**
* Get the failed login response instance.
*
* @param Request $request
*
* @return void
*
* @throws ValidationException
*/
protected function sendFailedLoginResponse(Request $request)
{
$exception = ValidationException::withMessages(
[
$this->username() => [trans('auth.failed')],
]
);
$exception->redirectTo = route('login');
throw $exception;
}
/**
* Log the user out of the application.
*
* @param Request $request
* @param Request $request
*
* @return RedirectResponse|Redirector|Response
*/
@@ -168,7 +199,7 @@ class LoginController extends Controller
/**
* Show the application's login form.
*
* @param Request $request
* @param Request $request
*
* @return Factory|Application|View|Redirector|RedirectResponse
* @throws FireflyException
@@ -213,35 +244,4 @@ class LoginController extends Controller
return view('auth.login', compact('allowRegistration', 'email', 'remember', 'allowReset', 'title', 'usernameField'));
}
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return $this->username;
}
/**
* Get the failed login response instance.
*
* @param Request $request
*
* @return void
*
* @throws ValidationException
*/
protected function sendFailedLoginResponse(Request $request)
{
$exception = ValidationException::withMessages(
[
$this->username() => [trans('auth.failed')],
]
);
$exception->redirectTo = route('login');
throw $exception;
}
}