fix: apply correct return type and response handling
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user