Fix Pint formatting

This commit is contained in:
root
2026-06-09 01:25:14 -04:00
parent 6be4875c5e
commit 20a0b6c4e5
1485 changed files with 11318 additions and 10273 deletions
@@ -10,8 +10,7 @@ class WhatsappInviteService
private WhatsappContextService $context,
private WhatsappInviteBundleService $bundleService,
private WhatsappInviteNotificationService $notificationService
) {
}
) {}
public function send(array $payload): array
{
@@ -25,7 +24,7 @@ class WhatsappInviteService
$linkBySection = [];
foreach ($links as $link) {
$cid = (int) ($link->class_section_id ?? 0);
if ($cid && !isset($linkBySection[$cid])) {
if ($cid && ! isset($linkBySection[$cid])) {
$linkBySection[$cid] = $link->toArray();
}
}
@@ -38,7 +37,7 @@ class WhatsappInviteService
continue;
}
$bundle = $this->bundleService->bundleForParent($pickedId, $linkBySection, $schoolYear, $semester);
if ($bundle && !empty($bundle['emails']) && !empty($bundle['links'])) {
if ($bundle && ! empty($bundle['emails']) && ! empty($bundle['links'])) {
$bundles[] = $bundle;
}
}
@@ -46,14 +45,14 @@ class WhatsappInviteService
$classSectionId = (int) ($payload['class_section_id'] ?? 0);
$classBundles = $this->bundleService->bundlesForClass($classSectionId, $linkBySection, $schoolYear, $semester);
foreach ($classBundles as $bundle) {
if (!empty($bundle['emails']) && !empty($bundle['links'])) {
if (! empty($bundle['emails']) && ! empty($bundle['links'])) {
$bundles[] = $bundle;
}
}
} elseif ($mode === 'all') {
$allBundles = $this->bundleService->bundlesForAll($linkBySection, $schoolYear, $semester);
foreach ($allBundles as $bundle) {
if (!empty($bundle['emails']) && !empty($bundle['links'])) {
if (! empty($bundle['emails']) && ! empty($bundle['links'])) {
$bundles[] = $bundle;
}
}
@@ -70,7 +69,7 @@ class WhatsappInviteService
$consolidated = $this->bundleService->consolidateBundles($bundles);
$result = $this->notificationService->dispatch($consolidated, $schoolYear, $semester);
if (!($result['ok'] ?? false)) {
if (! ($result['ok'] ?? false)) {
return $result + ['ok' => false];
}