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
@@ -14,14 +14,12 @@ use DateTimeZone;
class PaymentTestNotificationService
{
public function __construct(private EmailService $emailService)
{
}
public function __construct(private EmailService $emailService) {}
public function send(string $email, string $type = 'no_payment'): array
{
$email = trim($email);
if ($email === '' || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
if ($email === '' || ! filter_var($email, FILTER_VALIDATE_EMAIL)) {
return ['ok' => false, 'message' => 'Invalid email address.'];
}
@@ -53,11 +51,11 @@ class PaymentTestNotificationService
$ccEmail = $this->findSecondaryGuardianEmail($parentId, $email);
$parentName = $user ? trim(($user->firstname ?? '') . ' ' . ($user->lastname ?? '')) : '';
$parentName = $user ? trim(($user->firstname ?? '').' '.($user->lastname ?? '')) : '';
$monthYear = $now->format('F Y');
$subject = sprintf('Monthly Tuition Reminder — %s', $schoolYear);
$greeting = $parentName !== '' ? "Dear {$parentName}," : 'Dear Parent,';
$balanceFmt = '$' . number_format($totalBalance, 2);
$balanceFmt = '$'.number_format($totalBalance, 2);
$intro = ($type === 'no_payment')
? "We noticed there are outstanding tuition charges for {$schoolYear} but no payment has been recorded yet."
: "This is your monthly installment reminder for {$schoolYear}.";
@@ -79,11 +77,11 @@ class PaymentTestNotificationService
</div>
HTML;
$bodyHtml .= "<ul>"
. "<li><strong>Remaining installments:</strong> {$installmentInfo['remaining_installments']}</li>"
. "<li><strong>Suggested installment this month:</strong> {$installmentInfo['installment_due_fmt']}</li>"
. "<li><strong>Maximum installments available:</strong> {$installmentInfo['max_installments']}</li>"
. "</ul>";
$bodyHtml .= '<ul>'
."<li><strong>Remaining installments:</strong> {$installmentInfo['remaining_installments']}</li>"
."<li><strong>Suggested installment this month:</strong> {$installmentInfo['installment_due_fmt']}</li>"
."<li><strong>Maximum installments available:</strong> {$installmentInfo['max_installments']}</li>"
.'</ul>';
$body = MailHtml::document('Monthly Tuition Reminder', $bodyHtml);
@@ -168,7 +166,7 @@ class PaymentTestNotificationService
'remaining_installments' => $remainingInstallments,
'max_installments' => $maxInstallments,
'installment_due' => round($installmentDue, 2),
'installment_due_fmt' => '$' . number_format($installmentDue, 2),
'installment_due_fmt' => '$'.number_format($installmentDue, 2),
];
}
@@ -179,7 +177,7 @@ class PaymentTestNotificationService
}
$row = FamilyGuardian::query()->where('user_id', $parentId)->first();
if (!$row || empty($row->family_id)) {
if (! $row || empty($row->family_id)) {
return null;
}