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
@@ -9,9 +9,7 @@ class HomeworkTrackingService
{
private array $teacherAssignmentCache = [];
public function __construct(private HomeworkTrackingCalendarService $calendarService)
{
}
public function __construct(private HomeworkTrackingCalendarService $calendarService) {}
public function report(?string $semester = null, ?string $schoolYear = null, int $page = 1): array
{
@@ -122,7 +120,7 @@ class HomeworkTrackingService
$date = substr((string) ($row->hw_date ?? ''), 0, 10);
$cnt = (int) $row->cnt;
$firstCreated = substr((string) ($row->first_created ?? ''), 0, 10);
if ($csid <= 0 || !$date || $cnt <= 0) {
if ($csid <= 0 || ! $date || $cnt <= 0) {
continue;
}
@@ -138,7 +136,7 @@ class HomeworkTrackingService
}
$j = $baseIndex;
while ($j >= 0 && !empty($eventDays[$sundays[$j]])) {
while ($j >= 0 && ! empty($eventDays[$sundays[$j]])) {
$j--;
}
if ($j < 0) {
@@ -177,7 +175,7 @@ class HomeworkTrackingService
if ($sid <= 0) {
continue;
}
if (!isset($bySection[$sid])) {
if (! isset($bySection[$sid])) {
$bySection[$sid] = [
'class_section_id' => $sid,
'class_id' => (int) ($row->class_id ?? 0),
@@ -186,7 +184,7 @@ class HomeworkTrackingService
'tas' => [],
];
}
$name = trim((string) ($row->firstname ?? '') . ' ' . (string) ($row->lastname ?? ''));
$name = trim((string) ($row->firstname ?? '').' '.(string) ($row->lastname ?? ''));
$pos = strtolower((string) ($row->position ?? ''));
if ($name !== '') {
if ($pos === 'main') {
@@ -202,15 +200,23 @@ class HomeworkTrackingService
$ai = (int) ($a['class_id'] ?? 0);
$bi = (int) ($b['class_id'] ?? 0);
$order = function (int $cid): int {
if ($cid === 13) return 0;
if ($cid >= 1 && $cid <= 11) return $cid;
if ($cid === 12) return 99;
if ($cid === 13) {
return 0;
}
if ($cid >= 1 && $cid <= 11) {
return $cid;
}
if ($cid === 12) {
return 99;
}
return 200 + $cid;
};
$cmp = $order($ai) <=> $order($bi);
if ($cmp !== 0) {
return $cmp;
}
return strnatcasecmp($a['class_section_name'] ?? '', $b['class_section_name'] ?? '');
});