$row */ public static function fromMappedRow(array $row): self { return new self( employeeNumber: (string) ($row['employee_number'] ?? ''), type: self::nullableString($row['type'] ?? null), startDate: self::nullableString($row['start_date'] ?? null), endDate: self::nullableString($row['end_date'] ?? null), returnDate: self::nullableString($row['return_date'] ?? null), days: isset($row['days']) && $row['days'] !== '' ? (int) $row['days'] : null, status: self::nullableString($row['status'] ?? null), reason: self::nullableString($row['reason'] ?? null), ); } private static function nullableString(mixed $value): ?string { if ($value === null || $value === '') { return null; } return (string) $value; } }