wip: booking process, refactoring
This commit is contained in:
@@ -92,8 +92,8 @@ class Travel
|
||||
* Filters additional services based on the provided group(s) and optionally
|
||||
* by availability. Services are sorted alphabetically by label.
|
||||
*
|
||||
* @param mixed $group The service group(s) to filter by
|
||||
* @param bool $availableOnly Whether to include only available services
|
||||
* @param mixed $group The service group(s) to filter by
|
||||
* @param bool $availableOnly Whether to include only available services
|
||||
*
|
||||
* @return array<Service> The filtered and sorted services array
|
||||
*/
|
||||
@@ -118,8 +118,8 @@ class Travel
|
||||
* Filters transportation services based on travel direction and optionally
|
||||
* by availability. Services are sorted by subtype.
|
||||
*
|
||||
* @param string $direction The travel direction to filter by
|
||||
* @param bool $availableOnly Whether to include only available services
|
||||
* @param string $direction The travel direction to filter by
|
||||
* @param bool $availableOnly Whether to include only available services
|
||||
*
|
||||
* @return array<Service> The filtered and sorted transportation services
|
||||
*/
|
||||
@@ -193,7 +193,7 @@ class Travel
|
||||
public function getAvailableRooms(): array
|
||||
{
|
||||
return array_filter($this->rooms, function (Room $room) {
|
||||
return $room->available > 0 && $room->status === Constants::STATUS_AVAILABLE;
|
||||
return $room->available > 0 && Constants::STATUS_AVAILABLE === $room->status;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user