[chore] various code cleanup.

This commit is contained in:
James Cole
2025-01-21 06:34:39 +01:00
parent 15ac69bfad
commit d57327fd11
7 changed files with 62 additions and 6 deletions

View File

@@ -386,6 +386,18 @@ trait ConvertsDataTypes
return (int) $string;
}
protected function floatFromValue(?string $string): ?float
{
if (null === $string) {
return null;
}
if ('' === $string) {
return null;
}
return (float) $string;
}
/**
* Return integer value, or NULL when it's not set.
*/