You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewInvalidArgumentException(\sprintf('Only "%s" type is supported.', Number::class);
51
51
}
52
52
53
53
if (!\is_int($data) && !\is_string($data)) {
54
-
throw NotNormalizableValueException::createForUnexpectedDataType('The data is neither an integer nor a string, you should pass an integer or a string that represents a decimal number.', $data, ['int', 'string'], $context['deserialization_path'] ?? null, true);
54
+
throw NotNormalizableValueException::createForUnexpectedDataType('The data is neither an "int" nor a "string", you should pass an "int" or a "string" that represents a decimal number.', $data, ['int', 'string'], $context['deserialization_path'] ?? null, true);
55
55
}
56
56
57
57
try {
58
58
returnnewNumber($data);
59
59
} catch (\ValueError$e) {
60
-
throw NotNormalizableValueException::createForUnexpectedDataType('The data must represent a decimal number', $data, [$type], $context['deserialization_path'] ?? null, true, 0, $e);
60
+
throw NotNormalizableValueException::createForUnexpectedDataType('The data must represent a decimal number', $data, ['int', 'string'], $context['deserialization_path'] ?? null, true, 0, $e);
0 commit comments