wip: transportation services with discount
This commit is contained in:
@@ -151,7 +151,6 @@ class Travel
|
||||
{
|
||||
$services = array_filter($this->transportationServices, function (Service $service) use ($direction, $filterAvailable) {
|
||||
return $direction === $service->direction
|
||||
&& $service->price >= 0
|
||||
&& (false === $filterAvailable || $service->available > 0 || null === $service->available);
|
||||
});
|
||||
|
||||
|
||||
@@ -178,6 +178,8 @@ class TravelParser extends AbstractParser
|
||||
$service->label = $this->getStringOrNullValue($serviceNode->filterXPath('//text'));
|
||||
$service->direction = $this->getStringOrNullValue($serviceNode->filterXPath('//richtung'));
|
||||
$service->status = $this->getStringOrNullValue($serviceNode->filterXPath('//status'));
|
||||
$service->price = $this
|
||||
->stringToFloat($this->getStringOrNullValue($serviceNode->filterXPath('//preis')));
|
||||
|
||||
// Parse optional description from hinweis node
|
||||
$description = $this->getStringOrNullValue($serviceNode->filterXPath('//hinweis'));
|
||||
|
||||
Reference in New Issue
Block a user