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/Pref_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/Pref_Prefs.php')
| -rw-r--r-- | classes/Pref_Prefs.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/classes/Pref_Prefs.php b/classes/Pref_Prefs.php index 5cbf3c6d1..2bd9ae0bd 100644 --- a/classes/Pref_Prefs.php +++ b/classes/Pref_Prefs.php @@ -1481,17 +1481,11 @@ class Pref_Prefs extends Handler_Protected { } private function _get_short_desc(string $pref_name): string { - if (isset($this->pref_help[$pref_name][0])) { - return $this->pref_help[$pref_name][0]; - } - return ""; + return $this->pref_help[$pref_name][0] ?? ""; } private function _get_help_text(string $pref_name): string { - if (isset($this->pref_help[$pref_name][1])) { - return $this->pref_help[$pref_name][1]; - } - return ""; + return $this->pref_help[$pref_name][1] ?? ""; } private function appPasswordList(): void { |