Simplify code
This commit is contained in:
@@ -140,8 +140,7 @@ class HotelDataService implements SingletonInterface
|
|||||||
{
|
{
|
||||||
$hotelUid = $row['hotelUid'];
|
$hotelUid = $row['hotelUid'];
|
||||||
|
|
||||||
$hotelCategory = array_key_exists($row['hotelCategory'], Hotel::$categoryLabels) ?
|
$hotelCategory = Hotel::$categoryLabels[$row['hotelCategory']] ?? null;
|
||||||
Hotel::$categoryLabels[$row['hotelCategory']] : null;
|
|
||||||
|
|
||||||
if (!array_key_exists($hotelUid, $teasers)) {
|
if (!array_key_exists($hotelUid, $teasers)) {
|
||||||
$teasers[$hotelUid] = [
|
$teasers[$hotelUid] = [
|
||||||
@@ -199,8 +198,7 @@ class HotelDataService implements SingletonInterface
|
|||||||
{
|
{
|
||||||
if (!array_key_exists($row['hotelUid'], $hotels)) {
|
if (!array_key_exists($row['hotelUid'], $hotels)) {
|
||||||
|
|
||||||
$hotelCategory = array_key_exists($row['hotelCategory'], Hotel::$categoryLabels) ?
|
$hotelCategory = Hotel::$categoryLabels[$row['hotelCategory']] ?? null;
|
||||||
Hotel::$categoryLabels[$row['hotelCategory']] : null;
|
|
||||||
|
|
||||||
$hotels[$row['hotelUid']] = [
|
$hotels[$row['hotelUid']] = [
|
||||||
'hotel' => [
|
'hotel' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user