PHPstan fixes.

This commit is contained in:
James Cole
2023-11-05 08:15:17 +01:00
parent ff599795d3
commit c1cc71f85c
48 changed files with 101 additions and 166 deletions

View File

@@ -228,7 +228,7 @@ class UserEventHandler
*/
public function sendAdminRegistrationNotification(RegisteredUser $event): void
{
$sendMail = app('fireflyconfig')->get('notification_admin_new_reg', true)->data;
$sendMail = (bool) app('fireflyconfig')->get('notification_admin_new_reg', true)->data;
if ($sendMail) {
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
@@ -358,7 +358,7 @@ class UserEventHandler
*/
public function sendRegistrationMail(RegisteredUser $event): void
{
$sendMail = app('fireflyconfig')->get('notification_user_new_reg', true)->data;
$sendMail = (bool) app('fireflyconfig')->get('notification_user_new_reg', true)->data;
if ($sendMail) {
try {
Notification::send($event->user, new UserRegistrationNotification());