From 9dd4102c7fe2ddfc67f91ad9034d734a4458cc01 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sun, 4 Aug 2024 15:42:11 +0000 Subject: Replace basic 'isset()' cases with the null coalescing operator. --- classes/Prefs.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'classes/Prefs.php') diff --git a/classes/Prefs.php b/classes/Prefs.php index f778f0f84..8d84d5ec2 100644 --- a/classes/Prefs.php +++ b/classes/Prefs.php @@ -303,11 +303,7 @@ class Prefs { */ private function _get_cache(string $pref_name, int $owner_uid, ?int $profile_id) { $cache_key = sprintf("%d/%d/%s", $owner_uid, $profile_id, $pref_name); - - if (isset($this->cache[$cache_key])) - return $this->cache[$cache_key]; - - return null; + return $this->cache[$cache_key] ?? null; } /** -- cgit v1.2.3-54-g00ecf