WIP: Implement role house manager and feedback providing

This commit is contained in:
Björn Fromme
2023-11-04 18:24:54 +01:00
parent 538d39f63e
commit d5da0d10d5
23 changed files with 576 additions and 37 deletions
@@ -37,14 +37,16 @@ class HotelDataProvider
return $this->getAll()[$busProId] ?? null;
}
public function findByCode(string $code): ?Hotel
public function findByCode(string $code): array
{
$hotels = [];
foreach ($this->getAll() as $hotel) {
if ($code === $hotel->getCode()) {
return $hotel;
if (str_starts_with($hotel->getCode(), $code)) {
$hotels[] = $hotel;
}
}
return null;
return $hotels;
}
}