$data->
set('vatIds', null
);
} /** @var ?RequestDataBag $vatIds */
$vatIds =
$data->
get('vatIds'
);
if ($vatIds) { $vatIds = \
array_filter($vatIds->
all());
$data->
set('vatIds',
empty($vatIds) ? null :
$vatIds);
} if (!
$data->
get('salutationId'
)) { $data->
set('salutationId',
$this->
getDefaultSalutationId($context));
} $this->
dispatchValidationEvent($validation,
$data,
$context->
getContext());
$this->validator->
validate($data->
all(),
$validation);
$customerData =
$data->
only('firstName', 'lastName', 'salutationId', 'title', 'company', 'accountType'
);
if ($vatIds) { $customerData['vatIds'
] =
$data->
get('vatIds'
);
}