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
@@ -11,9 +11,7 @@ use Illuminate\Support\Facades\Schema;
class StudentAssignmentService
{
public function __construct(private StudentConfigService $configService)
{
}
public function __construct(private StudentConfigService $configService) {}
public function assignClasses(int $studentId, array $classSectionIds, bool $isEventOnly, ?int $userId = null): array
{
@@ -27,7 +25,7 @@ class StudentAssignmentService
}
$student = Student::query()->find($studentId);
if (!$student) {
if (! $student) {
return ['ok' => false, 'message' => 'Student not found.'];
}
@@ -47,7 +45,7 @@ class StudentAssignmentService
}
$missing = array_diff($classSectionIds, array_keys($sectionMap));
if (!empty($missing)) {
if (! empty($missing)) {
return ['ok' => false, 'message' => 'One or more selected classes do not exist.'];
}
@@ -105,7 +103,7 @@ class StudentAssignmentService
}
}
if (!$isEventOnly) {
if (! $isEventOnly) {
$enrollment = Enrollment::query()
->where('student_id', $studentId)
->where('school_year', $schoolYear)
@@ -143,12 +141,12 @@ class StudentAssignmentService
$displayNames = [];
foreach ($classSectionIds as $classSectionId) {
$section = $sectionMap[$classSectionId] ?? null;
if (!$section) {
if (! $section) {
continue;
}
$name = (string) ($section['class_section_name'] ?? '');
if ($name === '') {
$name = 'Section #' . $classSectionId;
$name = 'Section #'.$classSectionId;
}
$displayNames[] = $name;
}
@@ -180,7 +178,7 @@ class StudentAssignmentService
->where('school_year', $schoolYear)
->first();
if (!$row) {
if (! $row) {
return ['ok' => false, 'message' => 'Assignment not found for this student/class.'];
}
@@ -212,7 +210,7 @@ class StudentAssignmentService
->first();
if ($enrollment) {
$newClassId = !empty($remainingIds) ? $remainingIds[0] : null;
$newClassId = ! empty($remainingIds) ? $remainingIds[0] : null;
if ((int) $enrollment->class_section_id === $classSectionId || $newClassId !== null) {
$enrollment->update([
'class_section_id' => $newClassId,
@@ -298,7 +296,7 @@ class StudentAssignmentService
$payload['updated_by'] = $modifiedBy;
}
$results[$table . '_updated'] = DB::table($table)
$results[$table.'_updated'] = DB::table($table)
->where('student_id', $studentId)
->where('semester', $semester)
->where('school_year', $schoolYear)
@@ -312,6 +310,7 @@ class StudentAssignmentService
{
$values = array_map('intval', $ids);
$values = array_values(array_unique(array_filter($values, static fn ($v) => $v > 0)));
return $values;
}
}