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
@@ -2,16 +2,14 @@
namespace App\Services\Grading;
use App\Support\MailHtml;
use App\Services\EmailService;
use App\Support\MailHtml;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class BelowSixtyEmailService
{
public function __construct(private EmailService $emailService)
{
}
public function __construct(private EmailService $emailService) {}
public function send(array $payload): array
{
@@ -25,6 +23,7 @@ class BelowSixtyEmailService
if ($studentId <= 0) {
Log::warning('Below60Email: missing student_id');
return ['ok' => false, 'message' => 'Missing student id.'];
}
@@ -42,6 +41,7 @@ class BelowSixtyEmailService
if (empty($rows)) {
Log::warning('Below60Email: no guardian emails', ['student_id' => $studentId]);
return ['ok' => false, 'message' => 'No guardian email addresses.'];
}
@@ -57,17 +57,17 @@ class BelowSixtyEmailService
$primary = $rows[0] ?? null;
$parentName = '';
if ($primary) {
$parentName = trim((string) ($primary->firstname ?? '') . ' ' . (string) ($primary->lastname ?? ''));
$parentName = trim((string) ($primary->firstname ?? '').' '.(string) ($primary->lastname ?? ''));
}
$subject = (string) ($payload['subject'] ?? '');
if ($subject === '') {
$subject = 'Student Performance Alert';
if ($studentName !== '') {
$subject .= ' — ' . $studentName;
$subject .= ' — '.$studentName;
}
if ($semester !== '' || $schoolYear !== '') {
$subject .= ' (' . trim($semester . ' ' . $schoolYear) . ')';
$subject .= ' ('.trim($semester.' '.$schoolYear).')';
}
}