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