add tests batch 20
This commit is contained in:
@@ -10,7 +10,8 @@ class PaymentEnrollmentEventService
|
||||
{
|
||||
public function __construct(
|
||||
private ApplicationUrlService $urls,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function buildEventData(
|
||||
int $parentId,
|
||||
@@ -28,7 +29,7 @@ class PaymentEnrollmentEventService
|
||||
->where('id', $parentId)
|
||||
->first();
|
||||
|
||||
if (! $parent) {
|
||||
if (!$parent) {
|
||||
throw new \RuntimeException("Parent user #{$parentId} not found");
|
||||
}
|
||||
|
||||
@@ -103,7 +104,7 @@ class PaymentEnrollmentEventService
|
||||
}
|
||||
$seen[$sid] = true;
|
||||
|
||||
$teacherFull = trim(trim((string) ($row['t_firstname'] ?? '')).' '.trim((string) ($row['t_lastname'] ?? '')));
|
||||
$teacherFull = trim(trim((string) ($row['t_firstname'] ?? '')) . ' ' . trim((string) ($row['t_lastname'] ?? '')));
|
||||
$teacherFull = $teacherFull !== '' ? $teacherFull : null;
|
||||
|
||||
$students[] = [
|
||||
@@ -111,7 +112,7 @@ class PaymentEnrollmentEventService
|
||||
'student_id' => $sid,
|
||||
'firstname' => (string) ($row['s_firstname'] ?? ''),
|
||||
'lastname' => (string) ($row['s_lastname'] ?? ''),
|
||||
'name' => trim(((string) ($row['s_firstname'] ?? '')).' '.((string) ($row['s_lastname'] ?? ''))),
|
||||
'name' => trim(((string) ($row['s_firstname'] ?? '')) . ' ' . ((string) ($row['s_lastname'] ?? ''))),
|
||||
'registration_grade' => (string) ($row['registration_grade'] ?? ''),
|
||||
'class_section_id' => isset($row['class_section_id']) ? (int) $row['class_section_id'] : null,
|
||||
'class_section_name' => $row['class_section_name'] ?? null,
|
||||
|
||||
Reference in New Issue
Block a user