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
@@ -8,9 +8,7 @@ use App\Models\User;
class TeacherAssignmentService
{
public function __construct(private TeacherConfigService $configService)
{
}
public function __construct(private TeacherConfigService $configService) {}
public function listAssignments(?string $schoolYear = null): array
{
@@ -53,7 +51,7 @@ class TeacherAssignmentService
}
$role = strtolower((string) ($assign['position'] ?? ''));
if (!in_array($role, ['main', 'ta'], true)) {
if (! in_array($role, ['main', 'ta'], true)) {
continue;
}
@@ -73,9 +71,9 @@ class TeacherAssignmentService
continue;
}
$assigned = $assignmentMap[$tid] ?? ['main' => [], 'ta' => []];
$name = trim(($teacher['firstname'] ?? '') . ' ' . ($teacher['lastname'] ?? ''));
$name = trim(($teacher['firstname'] ?? '').' '.($teacher['lastname'] ?? ''));
if ($name === '') {
$name = 'User#' . $tid;
$name = 'User#'.$tid;
}
$teacherData[] = [
@@ -170,7 +168,7 @@ class TeacherAssignmentService
$semester = trim((string) ($input['semester'] ?? $context['semester'] ?? ''));
$schoolYear = trim((string) ($input['school_year'] ?? $context['school_year'] ?? ''));
if ($teacherId <= 0 || $classSectionId <= 0 || !in_array($position, ['main', 'ta'], true) || $schoolYear === '' || $semester === '') {
if ($teacherId <= 0 || $classSectionId <= 0 || ! in_array($position, ['main', 'ta'], true) || $schoolYear === '' || $semester === '') {
return ['ok' => false, 'message' => 'Missing or invalid data for deletion.'];
}
@@ -182,12 +180,12 @@ class TeacherAssignmentService
->where('position', $position)
->first();
if (!$assignment) {
if (! $assignment) {
return ['ok' => false, 'message' => 'Assignment not found.'];
}
$assignment->delete();
return ['ok' => true, 'message' => ucfirst($position) . ' assignment removed successfully.'];
return ['ok' => true, 'message' => ucfirst($position).' assignment removed successfully.'];
}
}