private function coerceFloat($value)
{
if ($value === '') {
throw new InvariantViolation('Float cannot represent non numeric value: (empty string)');
}
if (is_numeric($value) || $value === true || $value === false) {
return (double) $value;
}
throw new InvariantViolation('Float cannot represent non numeric value: ' . Utils::printSafe($value));
}