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. --- include/colors.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/colors.php b/include/colors.php index 64e24f8f1..35b84b9de 100644 --- a/include/colors.php +++ b/include/colors.php @@ -156,10 +156,7 @@ function _resolve_htmlcolor(string $color): string { $color = strtolower($color); - if (isset($htmlcolors[$color])) - return $htmlcolors[$color]; - else - return $color; + return $htmlcolors[$color] ?? $color; } /** -- cgit v1.2.3-54-g00ecf