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
+15 -8
View File
@@ -37,11 +37,12 @@ class FeeRefundDetailService
$tuitionStudents = $registeredKids;
foreach ($withdrawnKids as $kid) {
$rawDate = $kid['withdrawal_date'] ?? null;
if (empty($rawDate) || !$deadline) {
if (empty($rawDate) || ! $deadline) {
Log::warning('Missing withdrawal date or deadline; billing withdrawn student.', [
'student_id' => $kid['student_id'] ?? null,
]);
$tuitionStudents[] = $kid;
continue;
}
@@ -52,6 +53,7 @@ class FeeRefundDetailService
'student_id' => $kid['student_id'] ?? null,
]);
$tuitionStudents[] = $kid;
continue;
}
@@ -62,12 +64,13 @@ class FeeRefundDetailService
$tuitionStudents = array_values(array_filter($tuitionStudents, function ($student) use ($schoolYear) {
$sid = (int) ($student['student_id'] ?? 0);
return $sid > 0 && StudentClass::hasNonEventAssignment($sid, $schoolYear);
}));
foreach ($tuitionStudents as &$student) {
$name = null;
if (!empty($student['class_section_id'])) {
if (! empty($student['class_section_id'])) {
$name = ClassSection::getClassSectionNameBySectionId($student['class_section_id']);
}
$student['grade_name'] = is_string($name) ? strtoupper(trim($name)) : 'N/A';
@@ -129,7 +132,7 @@ class FeeRefundDetailService
if ($bookPriceRaw === null || $bookPriceRaw === '') {
return ['ok' => false, 'error' => 'Book price is not configured.'];
}
if (!is_numeric($bookPriceRaw)) {
if (! is_numeric($bookPriceRaw)) {
return ['ok' => false, 'error' => 'Book price must be numeric.'];
}
$bookPrice = round((float) $bookPriceRaw, 2);
@@ -146,9 +149,10 @@ class FeeRefundDetailService
$status = (string) ($student['enrollment_status'] ?? '');
if (in_array($status, ['enrolled', 'payment pending'], true)) {
$registered[] = $student;
continue;
}
if (!in_array($status, ['withdrawn', 'refund pending', 'withdraw under review'], true)) {
if (! in_array($status, ['withdrawn', 'refund pending', 'withdraw under review'], true)) {
continue;
}
$hasWithdrawn = true;
@@ -169,7 +173,7 @@ class FeeRefundDetailService
}
}
if (!$hasWithdrawn) {
if (! $hasWithdrawn) {
return ['ok' => false, 'error' => 'No withdrawn students found for refund evaluation.'];
}
@@ -203,7 +207,7 @@ class FeeRefundDetailService
}
}
$eligible = !empty($withdrawnEligible);
$eligible = ! empty($withdrawnEligible);
$refundAmount = 0.0;
$debitAmount = 0.0;
@@ -230,9 +234,9 @@ class FeeRefundDetailService
$refundableCash = min($totalPaid, $refundableTuition);
$raw = round($refundableCash - $bookPrice, 2);
if ($raw > 0 && !$fullDiscount) {
if ($raw > 0 && ! $fullDiscount) {
$refundAmount = $raw;
} elseif ($raw < 0 && !$fullDiscount) {
} elseif ($raw < 0 && ! $fullDiscount) {
$debitAmount = abs($raw);
}
}
@@ -259,6 +263,7 @@ class FeeRefundDetailService
public function calculateRefund(array $students, int $parentId): float
{
$result = $this->calculateRefundDetails($students, $parentId);
return (float) ($result['refund_amount'] ?? 0.0);
}
@@ -266,6 +271,7 @@ class FeeRefundDetailService
{
$resolvedGradeFee = $gradeFee ?? (int) (Configuration::getConfig('grade_fee') ?? 9);
$grades = new InvoiceGradeService($resolvedGradeFee);
return $grades->getGradeLevel($grade);
}
@@ -273,6 +279,7 @@ class FeeRefundDetailService
{
$resolvedGradeFee = $gradeFee ?? (int) (Configuration::getConfig('grade_fee') ?? 9);
$grades = new InvoiceGradeService($resolvedGradeFee);
return $grades->compareGrades((string) $gradeA, (string) $gradeB);
}