mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Autofix.
This commit is contained in:
@@ -80,7 +80,7 @@ class PersonJsonNormalizer implements
|
||||
}
|
||||
|
||||
foreach (['firstName', 'lastName', 'phonenumber', 'mobilenumber', 'gender',
|
||||
'birthdate', 'deathdate', 'center', 'altNames']
|
||||
'birthdate', 'deathdate', 'center', 'altNames', ]
|
||||
as $item) {
|
||||
if (!array_key_exists($item, $data)) {
|
||||
continue;
|
||||
@@ -133,8 +133,11 @@ class PersonJsonNormalizer implements
|
||||
break;
|
||||
|
||||
case 'altNames':
|
||||
foreach($data[$item] as $altName){
|
||||
$oldAltName = $person->getAltNames()->filter(function (PersonAltName $n) use ($altName) { return $n->getKey() === $altName['key']; })->first();
|
||||
foreach ($data[$item] as $altName) {
|
||||
$oldAltName = $person
|
||||
->getAltNames()
|
||||
->filter(static fn (PersonAltName $n): bool => $n->getKey() === $altName['key'])->first();
|
||||
|
||||
if (false === $oldAltName) {
|
||||
$newAltName = new PersonAltName();
|
||||
$newAltName->setKey($altName['key']);
|
||||
@@ -144,6 +147,7 @@ class PersonJsonNormalizer implements
|
||||
$oldAltName->setLabel($altName['label']);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user