From 79c6fbcc16ee2235f88b409962cfb938e200de02 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Fri, 14 Jun 2024 19:40:32 +0200 Subject: [PATCH] chore: :green_heart: fix psalm --- lib/Controller/PodcastController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Controller/PodcastController.php b/lib/Controller/PodcastController.php index 4edbec7..2e3dd29 100644 --- a/lib/Controller/PodcastController.php +++ b/lib/Controller/PodcastController.php @@ -29,11 +29,12 @@ class PodcastController extends Controller * @NoCSRFRequired */ public function index(string $url): JSONResponse { + $podcast = null; + if ($this->cacheFactory->isLocalCacheAvailable()) { try { $podcast = $this->podcastDataReader->tryGetCachedPodcastData($url); } catch (\Exception $e) { - $podcast = null; } }