throw NotNormalizableValueException::
createForUnexpectedDataType(sprintf('The type of the "%s" attribute for class "%s" must be one of "%s" ("%s" given).',
$attribute,
$currentClass,
implode('", "',
array_keys($expectedTypes)),
get_debug_type($data)),
$data,
array_keys($expectedTypes),
$context['deserialization_path'
] ??
$attribute);
} /**
* @internal
*/
protected function denormalizeParameter(\ReflectionClass
$class, \ReflectionParameter
$parameter, string
$parameterName, mixed
$parameterData, array
$context, string
$format = null
): mixed
{ if ($parameter->
isVariadic() || null ===
$this->propertyTypeExtractor || null ===
$types =
$this->
getTypes($class->
getName(),
$parameterName)) { return parent::
denormalizeParameter($class,
$parameter,
$parameterName,
$parameterData,
$context,
$format);
} $parameterData =
$this->
validateAndDenormalize($types,
$class->
getName(),
$parameterName,
$parameterData,
$format,
$context);
return $this->
applyCallbacks($parameterData,
$class->
getName(),
$parameterName,
$format,
$context);
} /**
* @return Type[]|null
*/
private function getTypes(string
$currentClass, string
$attribute): ?array
{