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/Pref_Prefs.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'classes/Pref_Prefs.php') 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 { -- cgit v1.2.3-54-g00ecf