Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-08 23:30:22 -04:00
parent 567dc24649
commit c792b8be05
1288 changed files with 10766 additions and 9669 deletions
@@ -10,8 +10,7 @@ class AttendanceNotificationLogService
{
public function __construct(
protected ParentNotification $notificationModel
) {
}
) {}
public function notificationAlreadySent(
int $studentId,
@@ -31,13 +30,14 @@ class AttendanceNotificationLogService
->where('incident_date', $ymd)
->where('channel', $channel);
if (!empty($to)) {
if (! empty($to)) {
$query->where('to_address', $to);
}
return $query->exists();
} catch (Throwable $e) {
Log::debug('notificationAlreadySent(): ' . $e->getMessage());
Log::debug('notificationAlreadySent(): '.$e->getMessage());
return false;
}
}
@@ -61,37 +61,37 @@ class AttendanceNotificationLogService
->whereDate('incident_date', $ymd)
->where('channel', $channel);
if (!empty($to)) {
if (! empty($to)) {
$existingQuery->where('to_address', $to);
}
$existing = $existingQuery->orderByDesc('id')->first();
if ($existing && !empty($existing->id)) {
if ($existing && ! empty($existing->id)) {
$existing->update([
'subject' => $subject,
'status' => $status,
'response' => $response,
'semester' => $semester,
'school_year' => $schoolYear,
'updated_at' => now(),
'subject' => $subject,
'status' => $status,
'response' => $response,
'semester' => $semester,
'school_year' => $schoolYear,
'updated_at' => now(),
]);
} else {
$this->notificationModel->query()->create([
'student_id' => $studentId,
'code' => $code,
'student_id' => $studentId,
'code' => $code,
'incident_date' => $ymd,
'channel' => $channel,
'to_address' => $to,
'subject' => $subject,
'status' => $status,
'response' => $response,
'semester' => $semester,
'school_year' => $schoolYear,
'channel' => $channel,
'to_address' => $to,
'subject' => $subject,
'status' => $status,
'response' => $response,
'semester' => $semester,
'school_year' => $schoolYear,
]);
}
} catch (Throwable $e) {
Log::debug('logNotification(): ' . $e->getMessage());
Log::debug('logNotification(): '.$e->getMessage());
}
}
}