mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Fixed phpstan issues
This commit is contained in:
parent
6997861811
commit
dd03ca943d
1 changed files with 1 additions and 1 deletions
|
@ -1195,7 +1195,7 @@ class OEMSecretsProvider implements InfoProviderInterface
|
||||||
// Check if the value is numeric with a unit
|
// Check if the value is numeric with a unit
|
||||||
if (preg_match('/^([\+\-]?\d+(\.\d+)?)([a-zA-Z%°]+)?$/u', $value, $matches)) {
|
if (preg_match('/^([\+\-]?\d+(\.\d+)?)([a-zA-Z%°]+)?$/u', $value, $matches)) {
|
||||||
// It is a number with or without a unit
|
// It is a number with or without a unit
|
||||||
$result['value_typ'] = isset($matches[1]) ? (float)$matches[1] : null;
|
$result['value_typ'] = (float) $matches[1];
|
||||||
$result['unit'] = $matches[3] ?? null;
|
$result['unit'] = $matches[3] ?? null;
|
||||||
} else {
|
} else {
|
||||||
// It's not a number, so we treat it as text
|
// It's not a number, so we treat it as text
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue