WIP: Implement role house manager and feedback providing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user