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
@@ -12,9 +12,7 @@ use RuntimeException;
class ReimbursementBatchService
{
public function __construct(private ReimbursementLookupService $lookupService)
{
}
public function __construct(private ReimbursementLookupService $lookupService) {}
public function createBatch(?string $title, int $userId, string $schoolYear, string $semester): array
{
@@ -31,7 +29,7 @@ class ReimbursementBatchService
'yearly_batch_number' => $sequence,
]);
$label = trim((string) $batch->title) !== '' ? (string) $batch->title : ('Batch #' . $sequence);
$label = trim((string) $batch->title) !== '' ? (string) $batch->title : ('Batch #'.$sequence);
if (trim((string) $batch->title) === '') {
$batch->title = $label;
$batch->save();
@@ -47,7 +45,7 @@ class ReimbursementBatchService
public function lockBatch(int $batchId, int $userId, string $schoolYear, string $semester): void
{
$batch = ReimbursementBatch::query()->find($batchId);
if (!$batch || strtolower((string) $batch->status) !== ReimbursementBatch::STATUS_OPEN) {
if (! $batch || strtolower((string) $batch->status) !== ReimbursementBatch::STATUS_OPEN) {
throw new RuntimeException('Batch not found or already closed.');
}
@@ -60,7 +58,7 @@ class ReimbursementBatchService
$adminIds = array_values(array_unique($adminRows->pluck('admin_id')->map(fn ($id) => (int) $id)->all()));
$requiredAdmins = array_values(array_filter($adminIds, static fn ($adminId) => $adminId > 0));
if (!empty($requiredAdmins)) {
if (! empty($requiredAdmins)) {
$uploadedAdminIds = ReimbursementBatchAdminFile::query()
->where('batch_id', $batchId)
->whereIn('admin_id', $requiredAdmins)
@@ -71,7 +69,7 @@ class ReimbursementBatchService
->all();
foreach ($requiredAdmins as $adminId) {
if (!in_array($adminId, $uploadedAdminIds, true)) {
if (! in_array($adminId, $uploadedAdminIds, true)) {
throw new RuntimeException('All admin sections must have a check file before submitting the batch.');
}
}
@@ -94,7 +92,7 @@ class ReimbursementBatchService
$reimbId = $item->batch_reimb_id ?: ($item->expense_reimb_id ?: $this->lookupService->findReimbursementIdForExpense($expenseId));
if (!$reimbId) {
if (! $reimbId) {
$payload = [
'expense_id' => $expenseId,
'amount' => (float) ($item->amount ?? 0),
@@ -122,7 +120,7 @@ class ReimbursementBatchService
]);
Expense::query()->where('id', $expenseId)->update(['reimbursement_id' => $reimbId]);
if (!empty($item->batch_item_id)) {
if (! empty($item->batch_item_id)) {
ReimbursementBatchItem::query()->where('id', (int) $item->batch_item_id)->update([
'reimbursement_id' => $reimbId,
]);