Various phpstan fixes [skip ci]

This commit is contained in:
James Cole
2025-01-04 08:42:06 +01:00
parent d4942efd8e
commit c43b37baef
34 changed files with 43 additions and 1229 deletions

View File

@@ -51,8 +51,7 @@ class AdminEventHandler
}
try {
$owner = new OwnerNotifiable();
Notification::send($owner, new UserInvitation($owner, $event->invitee));
Notification::send(new OwnerNotifiable(), new UserInvitation($event->invitee));
} catch (\Exception $e) { // @phpstan-ignore-line
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
@@ -158,7 +157,7 @@ class AdminEventHandler
Log::debug(sprintf('Will send %s as a notification.', $class));
try {
Notification::send($event->owner, new $class($event->owner));
Notification::send($event->owner, new $class());
} catch (\Exception $e) { // @phpstan-ignore-line
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {

View File

@@ -232,7 +232,7 @@ class UserEventHandler
$owner = $event->owner;
try {
Notification::send($owner, new AdminRegistrationNotification($event->owner, $event->user));
Notification::send($owner, new AdminRegistrationNotification($event->user));
} catch (\Exception $e) { // @phpstan-ignore-line
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
@@ -428,7 +428,7 @@ class UserEventHandler
Log::debug(sprintf('Will send %s as a notification.', $class));
try {
Notification::send($event->user, new $class($event->user));
Notification::send($event->user, new $class());
} catch (\Exception $e) { // @phpstan-ignore-line
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {