aboutsummaryrefslogtreecommitdiff
path: root/classes/Prefs.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-08-04 15:42:11 +0000
committerwn_ <invalid@email.com>2024-08-04 15:42:11 +0000
commit9dd4102c7fe2ddfc67f91ad9034d734a4458cc01 (patch)
treecff043e8cbfe87cfff5cad9df42949609058ce65 /classes/Prefs.php
parent6b521b5ed14dbc11bf9fecb40a2cd0ce541db9a8 (diff)
Replace basic 'isset()' cases with the null coalescing operator.
Diffstat (limited to 'classes/Prefs.php')
-rw-r--r--classes/Prefs.php6
1 files changed, 1 insertions, 5 deletions
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;
}
/**