Code cleanup

This commit is contained in:
James Cole
2023-12-02 07:26:03 +01:00
parent 00410c8486
commit 2b0a3ec818
5 changed files with 14 additions and 14 deletions

View File

@@ -131,7 +131,7 @@ class UserEventHandler
$group = null;
// create a new group.
while (true === $groupExists) { // @phpstan-ignore-line
while (true === $groupExists) { /** @phpstan-ignore-line */
$groupExists = UserGroup::where('title', $groupTitle)->count() > 0;
if (false === $groupExists) {
$group = UserGroup::create(['title' => $groupTitle]);
@@ -205,7 +205,7 @@ class UserEventHandler
if (false === $entry['notified']) {
try {
Notification::send($user, new UserLogin($ipAddress));
} catch (Exception $e) {// @phpstan-ignore-line
} catch (Exception $e) {/** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
@@ -239,7 +239,7 @@ class UserEventHandler
if ($repository->hasRole($user, 'owner')) {
try {
Notification::send($user, new AdminRegistrationNotification($event->user));
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) { /** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
@@ -316,7 +316,7 @@ class UserEventHandler
{
try {
Notification::send($event->user, new UserNewPassword(route('password.reset', [$event->token])));
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) { /** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
@@ -364,7 +364,7 @@ class UserEventHandler
if ($sendMail) {
try {
Notification::send($event->user, new UserRegistrationNotification());
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) { /** @phpstan-ignore-line */
$message = $e->getMessage();
if (str_contains($message, 'Bcc')) {
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');