@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public function toCdbCalendar(CalendarInterface $calendar) |
| 41 | 41 | { |
| 42 | 42 | $weekScheme = $this->getWeekScheme($calendar); |
| 43 | - $calendarType = (string) $calendar->getType(); |
|
| 43 | + $calendarType = (string)$calendar->getType(); |
|
| 44 | 44 | |
| 45 | 45 | switch ($calendarType) { |
| 46 | 46 | case CalendarType::MULTIPLE: |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps) |
| 101 | 101 | { |
| 102 | - $numberOfTimestamps = iterator_count($timestamps); |
|
| 102 | + $numberOfTimestamps = iterator_count($timestamps); |
|
| 103 | 103 | $timestamps->rewind(); |
| 104 | 104 | |
| 105 | 105 | return $numberOfTimestamps; |
@@ -133,12 +133,12 @@ discard block |
||
| 133 | 133 | foreach ($openingHours as $openingHour) { |
| 134 | 134 | // In CDB2 every day needs to be a seperate entry. |
| 135 | 135 | if (is_array($openingHour)) { |
| 136 | - $openingHour = (object) $openingHour; |
|
| 136 | + $openingHour = (object)$openingHour; |
|
| 137 | 137 | } |
| 138 | 138 | foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) { |
| 139 | 139 | $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime( |
| 140 | - $openingHour->getOpens()->toNativeString() . ':00', |
|
| 141 | - $openingHour->getCloses()->toNativeString() . ':00' |
|
| 140 | + $openingHour->getOpens()->toNativeString().':00', |
|
| 141 | + $openingHour->getCloses()->toNativeString().':00' |
|
| 142 | 142 | ); |
| 143 | 143 | } |
| 144 | 144 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | } else { |
| 222 | 222 | $days = iterator_to_array($period->getDatePeriod('1 DAY')); |
| 223 | 223 | $fillerTimestamps = array_map( |
| 224 | - function (DateTimeInterface $dateTime) use ($index) { |
|
| 224 | + function(DateTimeInterface $dateTime) use ($index) { |
|
| 225 | 225 | return new CultureFeed_Cdb_Data_Calendar_Timestamp( |
| 226 | 226 | $dateTime->format('Y-m-d'), |
| 227 | 227 | $this->createIndexedTimeString($index) |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | |
| 234 | 234 | $newCalendar = array_reduce( |
| 235 | 235 | array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]), |
| 236 | - function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
| 236 | + function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
| 237 | 237 | $calendar->add($timestamp); |
| 238 | 238 | return $calendar; |
| 239 | 239 | }, |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | $time = is_int($index) |
| 259 | - ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
| 259 | + ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
| 260 | 260 | : $timestamp->format('H:i:s'); |
| 261 | 261 | |
| 262 | 262 | return $time; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | */ |
| 269 | 269 | private function createIndexedTimeString($index) |
| 270 | 270 | { |
| 271 | - return '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT); |
|
| 271 | + return '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT); |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | /** |