fyydService, $this->itunesService]; foreach ($providers as $provider) { try { $podcasts = [...$podcasts, ...$provider->search($value)]; } catch (\Exception $e) { $this->logger->error($e->getMessage(), $e->getTrace()); } } usort($podcasts, fn (PodcastData $a, PodcastData $b) => $b->getFetchedAtUnix() <=> $a->getFetchedAtUnix()); $podcasts = array_values(array_intersect_key($podcasts, array_unique(array_map(fn (PodcastData $feed) => $feed->getLink(), $podcasts)))); return new JSONResponse($podcasts); } }