chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -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;
}
);
}
}