mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various code fixes
This commit is contained in:
@@ -50,12 +50,13 @@ class CategoryServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
// phpstan does not understand reference to 'auth'.
|
||||
$this->app->bind(
|
||||
CategoryRepositoryInterface::class,
|
||||
static function (Application $app) {
|
||||
/** @var CategoryRepository $repository */
|
||||
$repository = app(CategoryRepository::class);
|
||||
if ($app->auth->check()) {
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line
|
||||
$repository->setUser(auth()->user());
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ class CategoryServiceProvider extends ServiceProvider
|
||||
static function (Application $app) {
|
||||
/** @var OperationsRepository $repository */
|
||||
$repository = app(OperationsRepository::class);
|
||||
if ($app->auth->check()) {
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line
|
||||
$repository->setUser(auth()->user());
|
||||
}
|
||||
|
||||
@@ -81,7 +82,7 @@ class CategoryServiceProvider extends ServiceProvider
|
||||
static function (Application $app) {
|
||||
/** @var NoCategoryRepository $repository */
|
||||
$repository = app(NoCategoryRepository::class);
|
||||
if ($app->auth->check()) {
|
||||
if ($app->auth->check()) { // @phpstan-ignore-line
|
||||
$repository->setUser(auth()->user());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user