diff options
| author | wn_ <invalid@email.com> | 2024-08-04 15:42:11 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-08-04 15:42:11 +0000 |
| commit | 9dd4102c7fe2ddfc67f91ad9034d734a4458cc01 (patch) | |
| tree | cff043e8cbfe87cfff5cad9df42949609058ce65 /include | |
| parent | 6b521b5ed14dbc11bf9fecb40a2cd0ce541db9a8 (diff) | |
Replace basic 'isset()' cases with the null coalescing operator.
Diffstat (limited to 'include')
| -rw-r--r-- | include/colors.php | 5 |
1 files changed, 1 insertions, 4 deletions
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; } /** |