mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 11:08:28 +00:00
chore: reformat code.
This commit is contained in:
@@ -58,44 +58,6 @@ class JournalServiceProvider extends ServiceProvider
|
||||
$this->registerGroupCollector();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function registerGroupCollector(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
GroupCollectorInterface::class,
|
||||
static function (Application $app) {
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollector::class);
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
|
||||
$collector->setUser(auth()->user());
|
||||
}
|
||||
|
||||
return $collector;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register group repos.
|
||||
*/
|
||||
private function registerGroupRepository(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
TransactionGroupRepositoryInterface::class,
|
||||
static function (Application $app) {
|
||||
/** @var TransactionGroupRepositoryInterface $repository */
|
||||
$repository = app(TransactionGroupRepository::class);
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
|
||||
$repository->setUser(auth()->user());
|
||||
}
|
||||
|
||||
return $repository;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register repository.
|
||||
*/
|
||||
@@ -142,4 +104,42 @@ class JournalServiceProvider extends ServiceProvider
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register group repos.
|
||||
*/
|
||||
private function registerGroupRepository(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
TransactionGroupRepositoryInterface::class,
|
||||
static function (Application $app) {
|
||||
/** @var TransactionGroupRepositoryInterface $repository */
|
||||
$repository = app(TransactionGroupRepository::class);
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
|
||||
$repository->setUser(auth()->user());
|
||||
}
|
||||
|
||||
return $repository;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function registerGroupCollector(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
GroupCollectorInterface::class,
|
||||
static function (Application $app) {
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollector::class);
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line (phpstan does not understand the reference to auth)
|
||||
$collector->setUser(auth()->user());
|
||||
}
|
||||
|
||||
return $collector;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user