public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if ($source === null || $source === '') {
return null;
} elseif (is_string($source) && $configuration instanceof PropertyMappingConfigurationInterface) {
$source = $this->parseUsingLocaleIfConfigured($source, $configuration);
if ($source instanceof Error) {
return $source;
}
}
if (!is_numeric($source)) {
return new Error('"%s" cannot be converted to a float value.', 1332934124, [$source]);
}
return (double) $source;
}