feat: make boarding point price levelling switchable
This commit is contained in:
1 parent
0c6126010f
commit
f5e6d2105d
8 files changed
+92
-13
No files matched your search
@@ -8,6 +8,11 @@ use App\BusProNet\XmlCrawlerFactory;
|
||||
|
||||
class ApiResponseParser extends AbstractParser
|
||||
{
|
||||
public function __construct(
|
||||
private readonly TravelParser $travelParser,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ResponseParserException
|
||||
*/
|
||||
@@ -81,7 +86,7 @@ class ApiResponseParser extends AbstractParser
|
||||
throw new ResponseParserException('No travel data node found in product data response');
|
||||
}
|
||||
|
||||
return (new TravelParser())->parse($travelNode->first(), ...$additionalArgs);
|
||||
return $this->travelParser->parse($travelNode->first(), ...$additionalArgs);
|
||||
case ApiClient::TYPE_AGENCIES:
|
||||
return (new AgencyParser())->parse($resultNode);
|
||||
case ApiClient::TYPE_PURCHASE_VOUCHER:
|
||||
|
||||
Reference in new issue
Block a user