summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-12-02 12:01:01 +0100
committerCarl Schwan <carl@carlschwan.eu>2021-12-02 15:57:53 +0100
commitdfb569f097119ac8b5722607a86cc77e97bff3af (patch)
treeeae669a348404d76e8f24924d7e41cbf8eec90b7 /apps
parent324e0dc36ca1781de27fe30453e30c460cc3dfb4 (diff)
downloadnextcloud-server-dfb569f097119ac8b5722607a86cc77e97bff3af.tar.gz
nextcloud-server-dfb569f097119ac8b5722607a86cc77e97bff3af.zip
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')
-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;
}
}