Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-12-02 14:01:01 +0300
committerCarl Schwan <carl@carlschwan.eu>2021-12-02 17:57:53 +0300
commitdfb569f097119ac8b5722607a86cc77e97bff3af (patch)
treeeae669a348404d76e8f24924d7e41cbf8eec90b7 /apps/theming
parent324e0dc36ca1781de27fe30453e30c460cc3dfb4 (diff)
Follow upstream security recommandation
See https://scssphp.github.io/scssphp/docs/#security-considerations Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/Util.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index f18194c3266..208cd42934e 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -106,15 +106,14 @@ class Util {
*
* @return array
*/
- public function toHSL($red, $green, $blue)
- {
+ public function toHSL($red, $green, $blue) {
$min = min($red, $green, $blue);
$max = max($red, $green, $blue);
$l = $min + $max;
$d = $max - $min;
if ((int) $d === 0) {
- $h = $s = 0;
+ $h = $s = 0;
} else {
if ($l < 255) {
$s = $d / $l;
@@ -126,7 +125,7 @@ class Util {
$h = 60 * ($green - $blue) / $d;
} elseif ($green == $max) {
$h = 60 * ($blue - $red) / $d + 120;
- } elseif ($blue == $max) {
+ } else {
$h = 60 * ($red - $green) / $d + 240;
}
}