getIntOrNullValue($node->filterXPath('//idadresse')); $personId = $this->getIntOrNullValue($node->filterXPath('//idperson')); if (null === $addressId || null === $personId) { throw new \InvalidArgumentException('Missing required idadresse or idperson in contact form response.'); } $isNewRecord = $this->getBoolValue($node->filterXPath('//neuanlage')); return new RegistrationResponse( addressId: $addressId, personId: $personId, isNewRecord: $isNewRecord, ); } }