@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function toCdbCalendar(CalendarInterface $calendar) |
| 25 | 25 | { |
| 26 | 26 | $weekScheme = $this->getWeekScheme($calendar); |
| 27 | - $calendarType = (string) $calendar->getType(); |
|
| 27 | + $calendarType = (string)$calendar->getType(); |
|
| 28 | 28 | |
| 29 | 29 | switch ($calendarType) { |
| 30 | 30 | case CalendarType::MULTIPLE: |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps) |
| 84 | 84 | { |
| 85 | - $numberOfTimestamps = iterator_count($timestamps); |
|
| 85 | + $numberOfTimestamps = iterator_count($timestamps); |
|
| 86 | 86 | $timestamps->rewind(); |
| 87 | 87 | |
| 88 | 88 | return $numberOfTimestamps; |
@@ -116,12 +116,12 @@ discard block |
||
| 116 | 116 | foreach ($openingHours as $openingHour) { |
| 117 | 117 | // In CDB2 every day needs to be a seperate entry. |
| 118 | 118 | if (is_array($openingHour)) { |
| 119 | - $openingHour = (object) $openingHour; |
|
| 119 | + $openingHour = (object)$openingHour; |
|
| 120 | 120 | } |
| 121 | 121 | foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) { |
| 122 | 122 | $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime( |
| 123 | - $openingHour->getOpens()->toNativeString() . ':00', |
|
| 124 | - $openingHour->getCloses()->toNativeString() . ':00' |
|
| 123 | + $openingHour->getOpens()->toNativeString().':00', |
|
| 124 | + $openingHour->getCloses()->toNativeString().':00' |
|
| 125 | 125 | ); |
| 126 | 126 | } |
| 127 | 127 | } |
@@ -188,16 +188,16 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | $endTimestamp = new CultureFeed_Cdb_Data_Calendar_Timestamp( |
| 190 | 190 | $endDate->format('Y-m-d'), |
| 191 | - '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT), |
|
| 191 | + '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT), |
|
| 192 | 192 | $this->formatDateTimeAsCdbTime($endDate) |
| 193 | 193 | ); |
| 194 | 194 | |
| 195 | 195 | $days = iterator_to_array($period->getDatePeriod('1 DAY')); |
| 196 | 196 | $fillerTimestamps = array_map( |
| 197 | - function (DateTimeInterface $dateTime) use ($index) { |
|
| 197 | + function(DateTimeInterface $dateTime) use ($index) { |
|
| 198 | 198 | return new CultureFeed_Cdb_Data_Calendar_Timestamp( |
| 199 | 199 | $dateTime->format('Y-m-d'), |
| 200 | - '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
| 200 | + '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
| 201 | 201 | ); |
| 202 | 202 | }, |
| 203 | 203 | array_slice($days, 1, count($days) === 2 ? 2 : -1) |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $calendar = array_reduce( |
| 207 | 207 | array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]), |
| 208 | - function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
| 208 | + function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
| 209 | 209 | $calendar->add($timestamp); |
| 210 | 210 | return $calendar; |
| 211 | 211 | }, |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | $time = is_int($index) |
| 231 | - ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
| 231 | + ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
| 232 | 232 | : $timestamp->format('H:i:s'); |
| 233 | 233 | |
| 234 | 234 | if ($time == '00:00:00') { |