Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-09 00:03:03 -04:00
parent 8d4d610b82
commit b5fd4a4ca1
1414 changed files with 11317 additions and 10201 deletions
@@ -5,15 +5,12 @@ namespace App\Services\Invoices;
use App\Models\Enrollment;
use App\Models\Invoice;
use App\Models\Student;
use App\Models\StudentClass;
use App\Models\User;
use Illuminate\Support\Facades\DB;
class InvoiceManagementService
{
public function __construct(private InvoiceConfigService $config)
{
}
public function __construct(private InvoiceConfigService $config) {}
public function getManagementData(?string $schoolYear): array
{
@@ -47,7 +44,7 @@ class InvoiceManagementService
->all();
$parentData = [
'parent_name' => trim(($parent['firstname'] ?? '') . ' ' . ($parent['lastname'] ?? '')),
'parent_name' => trim(($parent['firstname'] ?? '').' '.($parent['lastname'] ?? '')),
'parent_id' => (int) $parent['id'],
'enrolledKids' => [],
'withdrawnKids' => [],
@@ -60,7 +57,7 @@ class InvoiceManagementService
$invoices = Invoice::getInvoicesByParentId((int) $parent['id'], $schoolYear);
foreach ($invoices as $invoice) {
if (!$invoice) {
if (! $invoice) {
continue;
}
@@ -68,13 +65,13 @@ class InvoiceManagementService
$parentData['last_updated'] = $invoice['updated_at'] ?? null;
$parentData['invoice_id'] = $invoice['id'] ?? null;
if (!empty($invoice['issue_date'])) {
if (! empty($invoice['issue_date'])) {
$tzName = $this->config->getTimezone();
$parentData['invoice_date'] = (new \DateTimeImmutable($invoice['issue_date'], new \DateTimeZone('UTC')))
->setTimezone(new \DateTimeZone($tzName))
->format('Y-m-d H:i:s');
} else {
$parentData['invoice_date'] = !empty($invoice['updated_at'])
$parentData['invoice_date'] = ! empty($invoice['updated_at'])
? date('Y-m-d H:i:s', strtotime($invoice['updated_at']))
: null;
}
@@ -115,7 +112,7 @@ class InvoiceManagementService
foreach ($enrollments as $enrollment) {
$kid = [
'name' => trim(($student['firstname'] ?? '') . ' ' . ($student['lastname'] ?? '')),
'name' => trim(($student['firstname'] ?? '').' '.($student['lastname'] ?? '')),
'grade' => $grade,
'tuition_fee' => (float) ($enrollment['tuition_fee'] ?? 0),
];
@@ -136,7 +133,7 @@ class InvoiceManagementService
}
}
if (!empty($parentData['enrolledKids']) || !empty($parentData['withdrawnKids'])) {
if (! empty($parentData['enrolledKids']) || ! empty($parentData['withdrawnKids'])) {
$invoiceData[] = $parentData;
}
}