wip: booking process, refactoring

This commit is contained in:
Björn Fromme
2025-07-16 19:37:17 +02:00
parent 47faa6b08e
commit eecea0abd1
43 changed files with 2269 additions and 366 deletions
+5 -5
View File
@@ -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;
});
}
}