Clean up some code

This commit is contained in:
James Cole
2022-12-31 07:33:44 +01:00
parent 27a576ae8a
commit 24696bf800
18 changed files with 29 additions and 26 deletions

View File

@@ -65,7 +65,8 @@ class AccountServiceProvider extends ServiceProvider
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepository::class);
if ($app->auth->check()) {
// phpstan thinks auth does not exist.
if ($app->auth->check()) { // @phpstan-ignore-line
$repository->setUser(auth()->user());
}
@@ -79,7 +80,8 @@ class AccountServiceProvider extends ServiceProvider
/** @var OperationsRepository $repository */
$repository = app(OperationsRepository::class);
if ($app->auth->check()) {
// phpstan thinks auth does not exist.
if ($app->auth->check()) { // @phpstan-ignore-line
$repository->setUser(auth()->user());
}
@@ -99,7 +101,8 @@ class AccountServiceProvider extends ServiceProvider
/** @var AccountTaskerInterface $tasker */
$tasker = app(AccountTasker::class);
if ($app->auth->check()) {
// phpstan thinks auth does not exist.
if ($app->auth->check()) { // @phpstan-ignore-line
$tasker->setUser(auth()->user());
}