Various code fixes

This commit is contained in:
James Cole
2022-12-31 13:32:42 +01:00
parent 5878b2c427
commit 7722ca2bf0
34 changed files with 106 additions and 174 deletions

View File

@@ -69,7 +69,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
$repository->setUser(auth()->user());
}
@@ -83,7 +83,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var JournalAPIRepositoryInterface $repository */
$repository = app(JournalAPIRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
$repository->setUser(auth()->user());
}
@@ -97,7 +97,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var JournalCLIRepositoryInterface $repository */
$repository = app(JournalCLIRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
$repository->setUser(auth()->user());
}
@@ -116,7 +116,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var TransactionGroupRepositoryInterface $repository */
$repository = app(TransactionGroupRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
$repository->setUser(auth()->user());
}
@@ -135,7 +135,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollector::class);
if ($app->auth->check()) {
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
$collector->setUser(auth()->user());
}