mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-11 15:16:27 +00:00
Various code cleanup.
This commit is contained in:
@@ -33,6 +33,8 @@ use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Safe\Exceptions\UrlException;
|
||||
|
||||
use function Safe\parse_url;
|
||||
@@ -60,7 +62,11 @@ class ForgotPasswordController extends Controller
|
||||
/**
|
||||
* Send a reset link to the given user.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param UserRepositoryInterface $repository
|
||||
*
|
||||
* @return Factory|RedirectResponse|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function sendResetLinkEmail(Request $request, UserRepositoryInterface $repository)
|
||||
{
|
||||
@@ -126,6 +132,8 @@ class ForgotPasswordController extends Controller
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showLinkRequestForm()
|
||||
{
|
||||
|
@@ -46,6 +46,8 @@ use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Symfony\Component\HttpFoundation\Response as ResponseAlias;
|
||||
|
||||
/**
|
||||
@@ -151,7 +153,7 @@ class LoginController extends Controller
|
||||
$this->sendFailedLoginResponse($request);
|
||||
|
||||
// @noinspection PhpUnreachableStatementInspection
|
||||
return response()->json([]);
|
||||
return response()->json();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,9 +221,13 @@ class LoginController extends Controller
|
||||
/**
|
||||
* Show the application's login form.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Application|Factory|Redirector|RedirectResponse|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showLoginForm(Request $request)
|
||||
{
|
||||
|
@@ -140,9 +140,14 @@ class RegisterController extends Controller
|
||||
/**
|
||||
* Show the application registration form if the invitation code is valid.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string $code
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showInviteForm(Request $request, string $code)
|
||||
{
|
||||
@@ -172,9 +177,13 @@ class RegisterController extends Controller
|
||||
/**
|
||||
* Show the application registration form.
|
||||
*
|
||||
* @param Request|null $request
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showRegistrationForm(?Request $request = null)
|
||||
{
|
||||
|
@@ -34,6 +34,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class ResetPasswordController
|
||||
@@ -112,11 +114,14 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* If no token is present, display the link request form.
|
||||
*
|
||||
* @param null $token
|
||||
* @param Request $request
|
||||
* @param null $token
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showResetForm(Request $request, $token = null)
|
||||
{
|
||||
|
@@ -37,6 +37,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PragmaRX\Google2FALaravel\Support\Authenticator;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class TwoFactorController.
|
||||
@@ -59,7 +61,11 @@ class TwoFactorController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Redirector|RedirectResponse
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function submitMFA(Request $request)
|
||||
{
|
||||
|
Reference in New Issue
Block a user