fix: retain original date of birth when anonymizing xml dumps

This commit is contained in:
Björn Fromme
2026-07-16 15:53:33 +02:00
parent bd2d8b58a3
commit fafc60eba9
2 changed files with 11 additions and 10 deletions
-8
View File
@@ -202,8 +202,6 @@ class BpnXmlAnonymizer
$title = '';
$gender = 'D';
$nationality = 'XX';
$birthDate = '01.01.1980';
$street = sprintf('%s %s', $this->faker->streetName(), $this->faker->buildingNumber());
$postalCode = $this->faker->postcode();
$city = $this->faker->city();
@@ -232,7 +230,6 @@ class BpnXmlAnonymizer
'title' => $title,
'gender' => $gender,
'nationality' => $nationality,
'birthDate' => $birthDate,
'street' => $street,
'postalCode' => $postalCode,
'city' => $city,
@@ -389,11 +386,6 @@ class BpnXmlAnonymizer
$this->replaceNodeValue($nationalityNode, $identity['nationality']);
}
$birthDateNode = $this->getDirectChild($personNode, 'geburtsdatum');
if (null !== $birthDateNode) {
$this->replaceNodeValue($birthDateNode, $identity['birthDate']);
}
$heightNode = $this->getDirectChild($personNode, 'sonstiges1');
if (null !== $heightNode) {
$this->replaceNodeValue($heightNode, $identity['height']);