sanitizeDescription($data['description'] ?? ''), location: $this->parseLocation($data), salaryMin: $data['salary_min'] ?? null, salaryMax: $data['salary_max'] ?? null, salaryCurrency: 'USD', jobType: $this->mapJobType($data['contract_type'] ?? null), sourceUrl: $data['redirect_url'] ?? null, applyUrl: $data['redirect_url'] ?? null, postedAt: $this->parseDate($data['created'] ?? null), expiresAt: null, remoteAllowed: $this->isRemote($data), experienceLevel: null, category: $data['category']['label'] ?? null, rawData: $data, ); } catch (\Throwable $e) { throw new TransformationException( 'Adzuna', 'Failed to transform Adzuna job data: ' . $e->getMessage(), ['data' => $data, 'error' => $e->getMessage()] ); } } public function transformMany(array $jobs): array { return array_map(fn($job) => $this->transform($job), $jobs); } private function sanitizeDescription(string $description): string { // Adzuna returns truncated descriptions with ellipsis (...) // Keep the description as-is but strip excessive HTML while preserving basic formatting $clean = strip_tags($description, '