wip: finalize implementation
This commit is contained in:
@@ -33,7 +33,6 @@ class InsuranceParser extends AbstractParser
|
||||
$individualInsurances = [];
|
||||
$xmlContent->filterXPath('//versicherungen/versicherung')
|
||||
->each(function (Crawler $node) use (&$individualInsurances, &$insurances) {
|
||||
$id = (int) $node->attr('idbuspro'); // Individual insurances have int IDs
|
||||
$isComplementary = $this->getBoolAttributeValue($node->attr('zusatzversicherung'));
|
||||
|
||||
// Parse all individual insurances for reference lookup
|
||||
@@ -110,7 +109,7 @@ class InsuranceParser extends AbstractParser
|
||||
|
||||
// Basic identifiers - packages have string IDs with 'P' prefix, individual insurances have int IDs
|
||||
$idValue = $node->attr('idbuspro');
|
||||
$insurance->id = $isPackage ? $idValue : (int) $idValue;
|
||||
$insurance->id = $idValue;
|
||||
$insurance->code = $node->attr('code');
|
||||
$insurance->label = $this->normalizeInsuranceLabel($node->attr('bezeichnung'));
|
||||
$insurance->subType = $node->attr('unterart');
|
||||
@@ -169,7 +168,7 @@ class InsuranceParser extends AbstractParser
|
||||
->each(function (Crawler $packageNode) use (&$referencedIds) {
|
||||
$packageNode->filterXPath('.//enthalteneversicherung')
|
||||
->each(function (Crawler $refNode) use (&$referencedIds) {
|
||||
$referencedIds[] = (int) $refNode->attr('idbuspro'); // Referenced insurances are always int IDs
|
||||
$referencedIds[] = $refNode->attr('idbuspro');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -188,7 +187,7 @@ class InsuranceParser extends AbstractParser
|
||||
$ids = [];
|
||||
$node->filterXPath('.//enthalteneversicherungen/enthalteneversicherung')
|
||||
->each(function (Crawler $insuranceNode) use (&$ids) {
|
||||
$ids[] = (int) $insuranceNode->attr('idbuspro'); // Individual insurance IDs are always int
|
||||
$ids[] = $insuranceNode->attr('idbuspro'); // Individual insurance IDs are always int
|
||||
});
|
||||
|
||||
return $ids;
|
||||
|
||||
Reference in New Issue
Block a user