wip: booking process, refactoring
This commit is contained in:
@@ -22,7 +22,7 @@ class Booking
|
||||
public ?float $price = null;
|
||||
public ?\DateTimeImmutable $bookingDate = null;
|
||||
public ?string $travelName = null;
|
||||
public ?int $travelId = null;
|
||||
public ?int $dateId = null;
|
||||
public ?string $travelCode = null;
|
||||
public ?\DateTimeImmutable $travelDate = null;
|
||||
public ?Travel $travelData = null;
|
||||
@@ -88,8 +88,8 @@ class Booking
|
||||
* Filters additional services by group and participant index mapping.
|
||||
* Returns services that are assigned to the specified participant.
|
||||
*
|
||||
* @param int $participantIndex The participant index to filter by
|
||||
* @param mixed $group The service group(s) to filter by
|
||||
* @param int $participantIndex The participant index to filter by
|
||||
* @param mixed $group The service group(s) to filter by
|
||||
*
|
||||
* @return array<Service> The filtered services for the participant
|
||||
*/
|
||||
@@ -108,14 +108,14 @@ class Booking
|
||||
* Finds the transportation service that matches the participant index
|
||||
* and travel direction (e.g., 'H' for outbound, 'R' for return).
|
||||
*
|
||||
* @param int $participantIndex The participant index to search for
|
||||
* @param string $direction The travel direction ('H' or 'R')
|
||||
* @param int $participantIndex The participant index to search for
|
||||
* @param string $direction The travel direction ('H' or 'R')
|
||||
*
|
||||
* @return Service|null The matching transportation service or null if not found
|
||||
*/
|
||||
public function getTransportationServiceForParticipantAndDirection(
|
||||
int $participantIndex,
|
||||
string $direction
|
||||
string $direction,
|
||||
): ?Service {
|
||||
foreach ($this->transportationServices as $service) {
|
||||
if ($service->direction !== $direction) {
|
||||
|
||||
Reference in New Issue
Block a user