@@ -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: |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $timestamp->getEndDate(), |
37 | 37 | $cdbCalendar, |
38 | 38 | $index |
39 | - ))) === -1 ?: $index++ ; |
|
39 | + ))) === -1 ?: $index++; |
|
40 | 40 | } |
41 | 41 | break; |
42 | 42 | case CalendarType::SINGLE: |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps) |
79 | 79 | { |
80 | - $numberOfTimestamps = iterator_count($timestamps); |
|
80 | + $numberOfTimestamps = iterator_count($timestamps); |
|
81 | 81 | $timestamps->rewind(); |
82 | 82 | |
83 | 83 | return $numberOfTimestamps; |
@@ -111,12 +111,12 @@ discard block |
||
111 | 111 | foreach ($openingHours as $openingHour) { |
112 | 112 | // In CDB2 every day needs to be a seperate entry. |
113 | 113 | if (is_array($openingHour)) { |
114 | - $openingHour = (object) $openingHour; |
|
114 | + $openingHour = (object)$openingHour; |
|
115 | 115 | } |
116 | 116 | foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) { |
117 | 117 | $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime( |
118 | - $openingHour->getOpens()->toNativeString() . ':00', |
|
119 | - $openingHour->getCloses()->toNativeString() . ':00' |
|
118 | + $openingHour->getOpens()->toNativeString().':00', |
|
119 | + $openingHour->getCloses()->toNativeString().':00' |
|
120 | 120 | ); |
121 | 121 | } |
122 | 122 | } |
@@ -183,16 +183,16 @@ discard block |
||
183 | 183 | |
184 | 184 | $endTimestamp = new CultureFeed_Cdb_Data_Calendar_Timestamp( |
185 | 185 | $endDate->format('Y-m-d'), |
186 | - '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT), |
|
186 | + '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT), |
|
187 | 187 | $this->formatDateTimeAsCdbTime($endDate) |
188 | 188 | ); |
189 | 189 | |
190 | 190 | $days = iterator_to_array($period->getDatePeriod('1 DAY')); |
191 | 191 | $fillerTimestamps = array_map( |
192 | - function (DateTimeInterface $dateTime) use ($index) { |
|
192 | + function(DateTimeInterface $dateTime) use ($index) { |
|
193 | 193 | return new CultureFeed_Cdb_Data_Calendar_Timestamp( |
194 | 194 | $dateTime->format('Y-m-d'), |
195 | - '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
195 | + '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
196 | 196 | ); |
197 | 197 | }, |
198 | 198 | array_slice($days, 1, count($days) === 2 ? 2 : -1) |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | $calendar = array_reduce( |
202 | 202 | array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]), |
203 | - function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
203 | + function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
204 | 204 | $calendar->add($timestamp); |
205 | 205 | return $calendar; |
206 | 206 | }, |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | } |
224 | 224 | |
225 | 225 | $time = is_int($index) |
226 | - ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
226 | + ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
227 | 227 | : $timestamp->format('H:i:s'); |
228 | 228 | |
229 | 229 | if ($time == '00:00:00') { |