Fix Laravel Pint formatting
This commit is contained in:
@@ -41,7 +41,9 @@ class AttendanceManagementController extends BaseApiController
|
||||
'reason' => ['nullable', 'string', 'max:255'],
|
||||
'notes' => ['nullable', 'string'],
|
||||
]);
|
||||
if ($validator->fails()) return $this->respondValidationError($validator->errors()->toArray());
|
||||
if ($validator->fails()) {
|
||||
return $this->respondValidationError($validator->errors()->toArray());
|
||||
}
|
||||
try {
|
||||
return $this->success(['event' => $this->service->manualEntry($validator->validated(), $request->user())], 'Manual attendance entry recorded.', Response::HTTP_CREATED);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
@@ -63,7 +65,9 @@ class AttendanceManagementController extends BaseApiController
|
||||
'authorized' => ['nullable'],
|
||||
'reason' => ['nullable', 'string', 'max:255'],
|
||||
]);
|
||||
if ($validator->fails()) return $this->respondValidationError($validator->errors()->toArray());
|
||||
if ($validator->fails()) {
|
||||
return $this->respondValidationError($validator->errors()->toArray());
|
||||
}
|
||||
try {
|
||||
return $this->success(['event' => $this->service->badgeScan($validator->validated(), $request->user())], 'Badge scan classified.');
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
@@ -91,7 +95,9 @@ class AttendanceManagementController extends BaseApiController
|
||||
'reason' => ['nullable', 'string', 'max:255'],
|
||||
'notes' => ['nullable', 'string'],
|
||||
]);
|
||||
if ($validator->fails()) return $this->respondValidationError($validator->errors()->toArray());
|
||||
if ($validator->fails()) {
|
||||
return $this->respondValidationError($validator->errors()->toArray());
|
||||
}
|
||||
try {
|
||||
return $this->success(['event' => $this->service->exitEntry($validator->validated(), $request->user())], 'Exit attendance entry recorded.', Response::HTTP_CREATED);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
@@ -113,7 +119,9 @@ class AttendanceManagementController extends BaseApiController
|
||||
'report_status' => ['nullable', 'string', 'max:48'],
|
||||
'reason' => ['nullable', 'string', 'max:255'],
|
||||
]);
|
||||
if ($validator->fails()) return $this->respondValidationError($validator->errors()->toArray());
|
||||
if ($validator->fails()) {
|
||||
return $this->respondValidationError($validator->errors()->toArray());
|
||||
}
|
||||
try {
|
||||
return $this->success(['event' => $this->service->markAbsent($validator->validated(), $request->user())], 'Absence recorded.', Response::HTTP_CREATED);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
@@ -130,7 +138,9 @@ class AttendanceManagementController extends BaseApiController
|
||||
'final_decision' => ['nullable', 'string', 'max:255'],
|
||||
'notes' => ['nullable', 'string'],
|
||||
]);
|
||||
if ($validator->fails()) return $this->respondValidationError($validator->errors()->toArray());
|
||||
if ($validator->fails()) {
|
||||
return $this->respondValidationError($validator->errors()->toArray());
|
||||
}
|
||||
try {
|
||||
return $this->success(['event' => $this->service->completeFollowUp($id, $validator->validated(), $request->user())], 'Follow-up completed.');
|
||||
} catch (\RuntimeException $e) {
|
||||
@@ -147,7 +157,9 @@ class AttendanceManagementController extends BaseApiController
|
||||
'slip_number' => ['nullable', 'string', 'max:64'],
|
||||
'late_slip_log_id' => ['nullable', 'integer'],
|
||||
]);
|
||||
if ($validator->fails()) return $this->respondValidationError($validator->errors()->toArray());
|
||||
if ($validator->fails()) {
|
||||
return $this->respondValidationError($validator->errors()->toArray());
|
||||
}
|
||||
try {
|
||||
return $this->success(['reprint' => $this->service->reprintLateSlip($id, $validator->validated(), $request->user())], 'Late slip reprint logged.', Response::HTTP_CREATED);
|
||||
} catch (\RuntimeException $e) {
|
||||
|
||||
Reference in New Issue
Block a user