feat(value objects): small optimisation of key case mapping
Small optimisation to condense the code and prevent additional if
checks (without using else
)
Alternatively:
$args = match ($map) {
'snake',
'camel',
'studly' => $args->mapWithKeys(fn($value, $key) => [str($key)->{$map}()->toString() => $value]),
default => $args,
};