Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-09 00:03:03 -04:00
parent 8d4d610b82
commit b5fd4a4ca1
1414 changed files with 11317 additions and 10201 deletions
@@ -14,6 +14,7 @@ class WhatsappInviteNotificationService
$listenerCount = Event::hasListeners(WhatsappInvitesSend::class) ? 1 : 0;
if ($listenerCount === 0) {
Log::warning('WhatsappInvitesSend has no listeners registered.');
return [
'ok' => false,
'message' => 'No event listener registered for WhatsappInvitesSend.',
@@ -29,6 +30,7 @@ class WhatsappInviteNotificationService
$out[$e] = true;
}
}
return array_keys($out);
};
@@ -47,9 +49,9 @@ class WhatsappInviteNotificationService
$to = $primaryEmails;
$cc = [];
if (!empty($primaryEmails) && !empty($secondaryEmails)) {
if (! empty($primaryEmails) && ! empty($secondaryEmails)) {
$cc = array_values(array_diff($secondaryEmails, $primaryEmails));
} elseif (empty($primaryEmails) && !empty($secondaryEmails)) {
} elseif (empty($primaryEmails) && ! empty($secondaryEmails)) {
$to = $secondaryEmails;
}
@@ -57,6 +59,7 @@ class WhatsappInviteNotificationService
Log::warning('Skipping WhatsApp invite: no recipient email(s).', [
'parent_id' => $bundle['parent']['id'] ?? null,
]);
continue;
}
@@ -73,7 +76,7 @@ class WhatsappInviteNotificationService
$triggered++;
} catch (\Throwable $e) {
Log::error('WhatsappInvitesSend dispatch failed: ' . $e->getMessage());
Log::error('WhatsappInvitesSend dispatch failed: '.$e->getMessage());
}
}
@@ -87,12 +90,12 @@ class WhatsappInviteNotificationService
{
$collected = [];
if (!empty($bundle['emails_secondary'])) {
if (! empty($bundle['emails_secondary'])) {
$collected = array_merge($collected, (array) $bundle['emails_secondary']);
}
if (!empty($bundle['secondary_parents'])) {
if (! empty($bundle['secondary_parents'])) {
foreach ((array) $bundle['secondary_parents'] as $sp) {
if (!empty($sp['email'])) {
if (! empty($sp['email'])) {
$collected[] = $sp['email'];
}
}
@@ -100,11 +103,11 @@ class WhatsappInviteNotificationService
$parent = $bundle['parent'] ?? [];
foreach (['secondary_email', 'secondparent_email', 'sec_email', 'email_secondary'] as $key) {
if (!empty($parent[$key])) {
if (! empty($parent[$key])) {
$collected[] = $parent[$key];
}
}
if (!empty($parent['secondparent']['email'])) {
if (! empty($parent['secondparent']['email'])) {
$collected[] = $parent['secondparent']['email'];
}
@@ -116,12 +119,12 @@ class WhatsappInviteNotificationService
->where('firstparent_id', $primaryId)
->orderByDesc('updated_at')
->first();
if (!empty($row?->secondparent_email)) {
if (! empty($row?->secondparent_email)) {
$collected[] = $row->secondparent_email;
}
}
} catch (\Throwable $e) {
Log::warning('Secondary email DB lookup failed: ' . $e->getMessage());
Log::warning('Secondary email DB lookup failed: '.$e->getMessage());
}
return $normalize($collected);