add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -13,7 +13,7 @@ class EmergencyContactDirectoryService
{
public function groups(?array $parentIds = null): array
{
$parentIds = ! empty($parentIds)
$parentIds = !empty($parentIds)
? array_values(array_filter(array_map('intval', $parentIds), static fn ($id) => $id > 0))
: EmergencyContact::query()
->distinct()
@@ -28,7 +28,7 @@ class EmergencyContactDirectoryService
$parent = User::query()->find($parentId);
$parentName = $parent
? trim((string) $parent->firstname.' '.(string) $parent->lastname)
? trim((string) $parent->firstname . ' ' . (string) $parent->lastname)
: 'Unknown Parent';
if ($parentName === '') {
$parentName = 'Unknown Parent';
@@ -67,11 +67,11 @@ class EmergencyContactDirectoryService
private function secondParentPhone(int $parentId): string
{
try {
if (! Schema::hasTable('parents')) {
if (!Schema::hasTable('parents')) {
return '';
}
if (! Schema::hasColumn('parents', 'secondparent_phone')) {
if (!Schema::hasColumn('parents', 'secondparent_phone')) {
return '';
}
@@ -82,8 +82,7 @@ class EmergencyContactDirectoryService
return $phone ? (string) $phone : '';
} catch (\Throwable $e) {
Log::debug('EmergencyContactDirectoryService: could not load second parent phone: '.$e->getMessage());
Log::debug('EmergencyContactDirectoryService: could not load second parent phone: ' . $e->getMessage());
return '';
}
}