mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Fix some phpstan issues.
This commit is contained in:
@@ -147,7 +147,13 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$route = $request->route();
|
||||
$accountId = (int) $route->parameter('account');
|
||||
$param = $route->parameter('account');
|
||||
if($param instanceof Account) {
|
||||
$accountId = (int) $param->id;
|
||||
}
|
||||
if(!($param instanceof Account)) {
|
||||
$accountId = (int) $param;
|
||||
}
|
||||
/** @var Account $account */
|
||||
$account = $user->accounts()->with(['accountType'])->withTrashed()->find($accountId);
|
||||
if (null === $account) {
|
||||
|
Reference in New Issue
Block a user