mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Various code cleanup
This commit is contained in:
@@ -44,6 +44,7 @@ class BillEventHandler
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
|
||||
$bill = $event->bill;
|
||||
/** @var bool $preference */
|
||||
$preference = Preferences::getForUser($bill->user, 'notification_bill_reminder', true)->data;
|
||||
|
||||
if (true === $preference) {
|
||||
|
||||
@@ -125,7 +125,7 @@ class UpdatedGroupEventHandler
|
||||
return;
|
||||
}
|
||||
// first journal:
|
||||
/** @var TransactionJournal $first */
|
||||
/** @var TransactionJournal|null $first */
|
||||
$first = $group->transactionJournals()
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
|
||||
@@ -143,7 +143,7 @@ class UserEventHandler
|
||||
throw new FireflyException('Email address can no longer be used for registrations.');
|
||||
}
|
||||
}
|
||||
/** @var UserRole $role */
|
||||
/** @var UserRole|null $role */
|
||||
$role = UserRole::where('title', UserRole::OWNER)->first();
|
||||
if (null === $role) {
|
||||
throw new FireflyException('The user role is unexpectedly empty. Did you run all migrations?');
|
||||
@@ -366,6 +366,7 @@ class UserEventHandler
|
||||
];
|
||||
}
|
||||
$preference = array_values($preference);
|
||||
/** @var bool $send */
|
||||
$send = app('preferences')->getForUser($user, 'notification_user_login', true)->data;
|
||||
app('preferences')->setForUser($user, 'login_ip_history', $preference);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user