fix gitlab tests
This commit is contained in:
@@ -16,4 +16,4 @@ class AdminNotificationAlertsResource extends JsonResource
|
||||
'table_ready' => (bool) ($this['table_ready'] ?? false),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,4 +15,4 @@ class PrintRecipientsResource extends JsonResource
|
||||
'table_ready' => (bool) ($this['table_ready'] ?? false),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,4 +19,4 @@ class ProgressGroupResource extends JsonResource
|
||||
'reports' => $reports, // keyed by subject for compatibility
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,4 +15,4 @@ class ProgressReportDetailResource extends JsonResource
|
||||
'subject_sections' => $this['subject_sections'] ?? [],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,4 +22,4 @@ class TeacherSubmissionReportResource extends JsonResource
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,4 @@ class AdminAttendanceResource extends JsonResource
|
||||
'admins_grid' => $this['admins_grid'] ?? [],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,4 +25,4 @@ class DailyAttendanceResource extends JsonResource
|
||||
'current_admin_name' => $this['currentAdminName'] ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ class TeacherAttendanceFormResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
$enable = (int) ($this['enable_attendance'] ?? 0);
|
||||
$enable = (int)($this['enable_attendance'] ?? 0);
|
||||
$res = $this->resource;
|
||||
$hasCanEditKey = is_array($res) && array_key_exists('can_edit', $res);
|
||||
|
||||
@@ -29,4 +29,4 @@ class TeacherAttendanceFormResource extends JsonResource
|
||||
'locked_by_student' => $this['locked_by_student'] ?? [],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class TeacherGridResource extends JsonResource
|
||||
'class_section_id' => $this['class_section_id'] ?? null,
|
||||
'sections' => $this['sections'] ?? [],
|
||||
'grid' => $this['grid'] ?? [],
|
||||
'locked' => (bool) ($this['locked'] ?? false),
|
||||
'locked' => (bool)($this['locked'] ?? false),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,9 +23,9 @@ class ClassProgressGroupCollection extends ResourceCollection
|
||||
continue;
|
||||
}
|
||||
|
||||
$key = $sectionId.'|'.$weekStart;
|
||||
$key = $sectionId . '|' . $weekStart;
|
||||
|
||||
if (! isset($groups[$key])) {
|
||||
if (!isset($groups[$key])) {
|
||||
$groups[$key] = [
|
||||
'week_start' => $weekStart,
|
||||
'week_end' => $report->week_end?->format('Y-m-d'),
|
||||
|
||||
@@ -14,9 +14,9 @@ class EventChargeResource extends JsonResource
|
||||
'event_id' => (int) ($this->event_id ?? 0),
|
||||
'event_name' => $this->event_name ?? null,
|
||||
'parent_id' => (int) ($this->parent_id ?? 0),
|
||||
'parent_name' => trim(($this->parent_firstname ?? '').' '.($this->parent_lastname ?? '')),
|
||||
'parent_name' => trim(($this->parent_firstname ?? '') . ' ' . ($this->parent_lastname ?? '')),
|
||||
'student_id' => (int) ($this->student_id ?? 0),
|
||||
'student_name' => trim(($this->student_firstname ?? '').' '.($this->student_lastname ?? '')),
|
||||
'student_name' => trim(($this->student_firstname ?? '') . ' ' . ($this->student_lastname ?? '')),
|
||||
'participation' => $this->getRawOriginal('participation') ?? $this->participation,
|
||||
'charged' => (float) ($this->getRawOriginal('charged') ?? $this->charged ?? 0),
|
||||
'school_year' => $this->school_year,
|
||||
|
||||
@@ -8,7 +8,7 @@ class MessageCollection extends ResourceCollection
|
||||
{
|
||||
public function with($request): array
|
||||
{
|
||||
if (! method_exists($this->resource, 'total')) {
|
||||
if (!method_exists($this->resource, 'total')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ class MessageResource extends JsonResource
|
||||
'status' => $this->status ?? null,
|
||||
'semester' => $this->semester ?? null,
|
||||
'school_year' => $this->school_year ?? null,
|
||||
'sender_name' => $this->sender ? trim($this->sender->firstname.' '.$this->sender->lastname) : null,
|
||||
'recipient_name' => $this->recipient ? trim($this->recipient->firstname.' '.$this->recipient->lastname) : null,
|
||||
'sender_name' => $this->sender ? trim($this->sender->firstname . ' ' . $this->sender->lastname) : null,
|
||||
'recipient_name' => $this->recipient ? trim($this->recipient->firstname . ' ' . $this->recipient->lastname) : null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class PaymentNotificationLogResource extends JsonResource
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
$parent = $this->resource->parent ?? null;
|
||||
$parentName = $parent ? trim(($parent->firstname ?? '').' '.($parent->lastname ?? '')) : null;
|
||||
$parentName = $parent ? trim(($parent->firstname ?? '') . ' ' . ($parent->lastname ?? '')) : null;
|
||||
|
||||
return [
|
||||
'id' => (int) ($this->resource->id ?? 0),
|
||||
|
||||
@@ -19,7 +19,6 @@ class StudentPromotionResource extends JsonResource
|
||||
if (is_array($r)) {
|
||||
return $r[$key] ?? $default;
|
||||
}
|
||||
|
||||
return $r->{$key} ?? $default;
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class ReimbursementRecipientResource extends JsonResource
|
||||
$id = (int) ($this->resource['id'] ?? 0);
|
||||
$first = $this->resource['firstname'] ?? '';
|
||||
$last = $this->resource['lastname'] ?? '';
|
||||
$name = trim($first.' '.$last);
|
||||
$name = trim($first . ' ' . $last);
|
||||
|
||||
return [
|
||||
'id' => $id,
|
||||
|
||||
@@ -15,7 +15,7 @@ class StaffCollection extends ResourceCollection
|
||||
|
||||
public function with($request): array
|
||||
{
|
||||
if (! method_exists($this->resource, 'total')) {
|
||||
if (!method_exists($this->resource, 'total')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class SupportRequestCollection extends ResourceCollection
|
||||
|
||||
public function with($request): array
|
||||
{
|
||||
if (! method_exists($this->resource, 'total')) {
|
||||
if (!method_exists($this->resource, 'total')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class NavItemResource extends JsonResource
|
||||
'target' => $item['target'] ?? null,
|
||||
'sort_order' => (int) ($item['sort_order'] ?? 0),
|
||||
'is_enabled' => (int) ($item['is_enabled'] ?? 0),
|
||||
'children' => ! empty($item['children'])
|
||||
'children' => !empty($item['children'])
|
||||
? NavItemResource::collection($item['children'])
|
||||
: [],
|
||||
];
|
||||
|
||||
@@ -24,4 +24,4 @@ class TeacherSubmissionRowResource extends JsonResource
|
||||
'missing_items' => $this['missing_items'] ?? [],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user