@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function toCdbCalendar(CalendarInterface $calendar) |
27 | 27 | { |
28 | 28 | $weekScheme = $this->getWeekScheme($calendar); |
29 | - $calendarType = (string) $calendar->getType(); |
|
29 | + $calendarType = (string)$calendar->getType(); |
|
30 | 30 | |
31 | 31 | switch ($calendarType) { |
32 | 32 | case CalendarType::MULTIPLE: |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps) |
86 | 86 | { |
87 | - $numberOfTimestamps = iterator_count($timestamps); |
|
87 | + $numberOfTimestamps = iterator_count($timestamps); |
|
88 | 88 | $timestamps->rewind(); |
89 | 89 | |
90 | 90 | return $numberOfTimestamps; |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | foreach ($openingHours as $openingHour) { |
119 | 119 | // In CDB2 every day needs to be a seperate entry. |
120 | 120 | if (is_array($openingHour)) { |
121 | - $openingHour = (object) $openingHour; |
|
121 | + $openingHour = (object)$openingHour; |
|
122 | 122 | } |
123 | 123 | foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) { |
124 | 124 | $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime( |
125 | - $openingHour->getOpens()->toNativeString() . ':00', |
|
126 | - $openingHour->getCloses()->toNativeString() . ':00' |
|
125 | + $openingHour->getOpens()->toNativeString().':00', |
|
126 | + $openingHour->getCloses()->toNativeString().':00' |
|
127 | 127 | ); |
128 | 128 | } |
129 | 129 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | } else { |
207 | 207 | $days = iterator_to_array($period->getDatePeriod('1 DAY')); |
208 | 208 | $fillerTimestamps = array_map( |
209 | - function (DateTimeInterface $dateTime) use ($index) { |
|
209 | + function(DateTimeInterface $dateTime) use ($index) { |
|
210 | 210 | return new CultureFeed_Cdb_Data_Calendar_Timestamp( |
211 | 211 | $dateTime->format('Y-m-d'), |
212 | 212 | $this->createIndexedTimeString($index) |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | $newCalendar = array_reduce( |
220 | 220 | array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]), |
221 | - function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
221 | + function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
222 | 222 | $calendar->add($timestamp); |
223 | 223 | return $calendar; |
224 | 224 | }, |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | $time = is_int($index) |
244 | - ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
244 | + ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
245 | 245 | : $timestamp->format('H:i:s'); |
246 | 246 | |
247 | 247 | return $time; |
@@ -253,6 +253,6 @@ discard block |
||
253 | 253 | */ |
254 | 254 | private function createIndexedTimeString($index) |
255 | 255 | { |
256 | - return '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT); |
|
256 | + return '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT); |
|
257 | 257 | } |
258 | 258 | } |