$row */ public static function fromMappedRow(array $row): self { return new self( employeeNumber: (string) ($row['employee_number'] ?? ''), bonusDate: self::nullableString($row['bonus_date'] ?? null), bonusType: self::nullableString($row['bonus_type'] ?? null), amount: isset($row['amount']) && $row['amount'] !== '' ? (float) $row['amount'] : null, reason: self::nullableString($row['reason'] ?? null), ); } private static function nullableString(mixed $value): ?string { if ($value === null || $value === '') { return null; } return (string) $value; } }