fix: apply correct return type and response handling

This commit is contained in:
Björn Fromme
2026-01-06 14:05:51 +01:00
parent 96205c14db
commit 1c1766bbd4
4 changed files with 9 additions and 8 deletions
@@ -4,18 +4,18 @@ declare(strict_types=1);
namespace App\BusProNet\XmlParser;
use App\BusProNet\Model\ContactFormResponse;
use App\BusProNet\Model\RegistrationResponse;
use Symfony\Component\DomCrawler\Crawler;
class ContactFormResponseParser extends AbstractParser
{
public function parse(Crawler $node): ContactFormResponse
public function parse(Crawler $node): RegistrationResponse
{
$addressId = (int) $node->filterXPath('//idadresse')->text();
$personId = (int) $node->filterXPath('//idperson')->text();
$isNewRecord = $this->getBoolValue($node->filterXPath('//neuanlage'));
return new ContactFormResponse(
return new RegistrationResponse(
addressId: $addressId,
personId: $personId,
isNewRecord: $isNewRecord,