Skip to content

Commit bff0caf

Browse files
author
LAPTOP-RSOLLPLO\sl
committed
Revert "Fix: Use correct BRND field names"
This reverts commit 991cf7e.
1 parent 991cf7e commit bff0caf

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/Feed/BrndFeedType.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ private function parseBrndBooking(array $booking): array
102102
$tz = new \DateTimeZone(self::BRND_API_TIMEZONE);
103103
// Parse start time
104104
$startDateTime = null;
105-
if (!empty($booking['dato']) && isset($booking['starttId']) && is_string($booking['starttId'])) {
105+
if (!empty($booking['dato']) && isset($booking['starttid']) && is_string($booking['starttid'])) {
106106
try {
107107
// Trim starttime to 6 digits after dot for microseconds
108-
$startTimeString = preg_replace('/\.(\d{6})\d+$/', '.$1', $booking['starttId']);
108+
$startTimeString = preg_replace('/\.(\d{6})\d+$/', '.$1', $booking['starttid']);
109109
$dateOnly = substr((string) $booking['dato'], 0, 10);
110110
$dateTimeString = $dateOnly.' '.$startTimeString;
111111
$startDateTime = \DateTimeImmutable::createFromFormat('m/d/Y H:i:s.u', $dateTimeString, $tz);
@@ -119,9 +119,9 @@ private function parseBrndBooking(array $booking): array
119119

120120
// Parse end time
121121
$endDateTime = null;
122-
if (!empty($booking['dato']) && isset($booking['sluttId']) && is_string($booking['sluttId'])) {
122+
if (!empty($booking['dato']) && isset($booking['sluttid']) && is_string($booking['sluttid'])) {
123123
try {
124-
$endTimeString = preg_replace('/\.(\d{6})\d+$/', '.$1', $booking['sluttId']);
124+
$endTimeString = preg_replace('/\.(\d{6})\d+$/', '.$1', $booking['sluttid']);
125125
$dateOnly = substr((string) $booking['dato'], 0, 10);
126126
$dateTimeString = $dateOnly.' '.$endTimeString;
127127
$endDateTime = \DateTimeImmutable::createFromFormat('m/d/Y H:i:s.u', $dateTimeString, $tz);
@@ -144,8 +144,8 @@ private function parseBrndBooking(array $booking): array
144144
'activity' => $booking['aktivitet'] ?? '',
145145
'team' => $booking['hold'] ?? '',
146146
'status' => $booking['status'] ?? '',
147-
'checkIn' => $booking['checkIN'] ?? '',
148-
'bookingBy' => $booking['ansøgtAF'] ?? '',
147+
'checkIn' => $booking['checK_IN'] ?? '',
148+
'bookingBy' => $booking['ansøgt_af'] ?? '',
149149
'changingRooms' => $booking['omklædningsrum'] ?? '',
150150
];
151151
}

0 commit comments

Comments
 (0)