aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/theming/lib/Util.php7
-rw-r--r--build/psalm-baseline.xml3
-rw-r--r--lib/private/Template/SCSSCacher.php5
3 files changed, 5 insertions, 10 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;
}
}
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index cca3cbd2b54..fdc177ffac8 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -345,9 +345,6 @@
</UndefinedPropertyFetch>
</file>
<file src="apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php">
- <ImplementedReturnTypeMismatch occurrences="1">
- <code>null|string</code>
- </ImplementedReturnTypeMismatch>
<InvalidNullableReturnType occurrences="1">
<code>array</code>
</InvalidNullableReturnType>
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php
index 0543427f997..536557e7a3d 100644
--- a/lib/private/Template/SCSSCacher.php
+++ b/lib/private/Template/SCSSCacher.php
@@ -45,7 +45,6 @@ use OCP\ILogger;
use OCP\IMemcache;
use OCP\IURLGenerator;
use ScssPhp\ScssPhp\Compiler;
-use ScssPhp\ScssPhp\Exception\ParserException;
use ScssPhp\ScssPhp\OutputStyle;
class SCSSCacher {
@@ -340,7 +339,7 @@ class SCSSCacher {
'@import "variables.scss";' .
'@import "functions.scss";' .
'@import "' . $fileNameSCSS . '";');
- } catch (ParserException $e) {
+ } catch (\Exception $e) {
$this->logger->logException($e, ['app' => 'scss_cacher']);
return false;
@@ -431,7 +430,7 @@ class SCSSCacher {
$scss = new Compiler();
$scss->compile($variables);
$this->injectedVariables = $variables;
- } catch (ParserException $e) {
+ } catch (\Exception $e) {
$this->logger->logException($e, ['app' => 'scss_cacher']);
}