Fix Laravel Pint formatting
This commit is contained in:
@@ -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,7 +82,8 @@ 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 '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user