diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-08-04 16:10:12 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-08-04 16:10:12 +0000 |
| commit | 3496402686224f3db921c91a1b25704ef26310ca (patch) | |
| tree | cff043e8cbfe87cfff5cad9df42949609058ce65 /classes/Prefs.php | |
| parent | 6b521b5ed14dbc11bf9fecb40a2cd0ce541db9a8 (diff) | |
| parent | 9dd4102c7fe2ddfc67f91ad9034d734a4458cc01 (diff) | |
Merge branch 'feature/isset-to-null-coalescing-op' into 'master'
Replace basic 'isset()' cases with the null coalescing operator.
See merge request tt-rss/tt-rss!51
Diffstat (limited to 'classes/Prefs.php')
| -rw-r--r-- | classes/Prefs.php | 6 |
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; } /** |