@@ -26,15 +26,15 @@ discard block |
||
26 | 26 | if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) { |
27 | 27 | /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */ |
28 | 28 | $period = $cdbCalendar->current(); |
29 | - $startDateString = $period->getDateFrom() . 'T00:00:00'; |
|
29 | + $startDateString = $period->getDateFrom().'T00:00:00'; |
|
30 | 30 | } elseif ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) { |
31 | 31 | $firstTimestamp = $cdbCalendar->current(); |
32 | 32 | $cdbCalendarAsArray = iterator_to_array($cdbCalendar); |
33 | 33 | $timestamp = $this->getFirstTimestamp($cdbCalendarAsArray, $firstTimestamp); |
34 | 34 | if ($timestamp->getStartTime()) { |
35 | - $startDateString = $timestamp->getDate() . 'T' . substr($timestamp->getStartTime(), 0, 5) . ':00'; |
|
35 | + $startDateString = $timestamp->getDate().'T'.substr($timestamp->getStartTime(), 0, 5).':00'; |
|
36 | 36 | } else { |
37 | - $startDateString = $timestamp->getDate() . 'T00:00:00'; |
|
37 | + $startDateString = $timestamp->getDate().'T00:00:00'; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | $startDate = !empty($startDateString) ? DateTimeFactory::dateTimeFromDateString($startDateString) : null; |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) { |
48 | 48 | /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */ |
49 | 49 | $period = $cdbCalendar->current(); |
50 | - $endDateString = $period->getDateTo() . 'T00:00:00'; |
|
50 | + $endDateString = $period->getDateTo().'T00:00:00'; |
|
51 | 51 | } elseif ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) { |
52 | 52 | $firstTimestamp = $cdbCalendar->current(); |
53 | 53 | /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */ |
54 | 54 | $cdbCalendarAsArray = iterator_to_array($cdbCalendar); |
55 | 55 | $timestamp = $this->getLastTimestamp($cdbCalendarAsArray, $firstTimestamp); |
56 | 56 | if ($timestamp->getEndTime()) { |
57 | - $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime(); |
|
57 | + $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime(); |
|
58 | 58 | } else { |
59 | 59 | $endTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00'; |
60 | - $endDateString = $timestamp->getDate() . 'T' . $endTime; |
|
60 | + $endDateString = $timestamp->getDate().'T'.$endTime; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | $endDate = !empty($endDateString) ? DateTimeFactory::dateTimeFromDateString($endDateString) : null; |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | $cdbCalendar->next(); |
76 | 76 | |
77 | 77 | $startTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00'; |
78 | - $startDateString = $timestamp->getDate() . 'T' . $startTime; |
|
78 | + $startDateString = $timestamp->getDate().'T'.$startTime; |
|
79 | 79 | |
80 | 80 | if ($timestamp->getEndTime()) { |
81 | - $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime(); |
|
81 | + $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime(); |
|
82 | 82 | } else { |
83 | - $endDateString = $timestamp->getDate() . 'T' . $startTime; |
|
83 | + $endDateString = $timestamp->getDate().'T'.$startTime; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | $timestamp = $this->createTimestamp( |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | $periods = array_map( |
100 | - function (array $periodParts) { |
|
100 | + function(array $periodParts) { |
|
101 | 101 | $firstPart = array_shift($periodParts); |
102 | 102 | $lastPart = array_pop($periodParts); |
103 | 103 | return new Timestamp( |
@@ -50,9 +50,9 @@ |
||
50 | 50 | public function serialize(): array |
51 | 51 | { |
52 | 52 | return [ |
53 | - 'phone' => $this->phones, |
|
54 | - 'email' => $this->emails, |
|
55 | - 'url' => $this->urls, |
|
53 | + 'phone' => $this->phones, |
|
54 | + 'email' => $this->emails, |
|
55 | + 'url' => $this->urls, |
|
56 | 56 | ]; |
57 | 57 | } |
58 | 58 |
@@ -75,21 +75,21 @@ |
||
75 | 75 | public static function fromUdb3ModelContactPoint(Udb3ModelContactPoint $contactPoint): ContactPoint |
76 | 76 | { |
77 | 77 | $phones = array_map( |
78 | - function (TelephoneNumber $phone) { |
|
78 | + function(TelephoneNumber $phone) { |
|
79 | 79 | return $phone->toString(); |
80 | 80 | }, |
81 | 81 | $contactPoint->getTelephoneNumbers()->toArray() |
82 | 82 | ); |
83 | 83 | |
84 | 84 | $emails = array_map( |
85 | - function (EmailAddress $emailAddress) { |
|
85 | + function(EmailAddress $emailAddress) { |
|
86 | 86 | return $emailAddress->toString(); |
87 | 87 | }, |
88 | 88 | $contactPoint->getEmailAddresses()->toArray() |
89 | 89 | ); |
90 | 90 | |
91 | 91 | $urls = array_map( |
92 | - function (Url $url) { |
|
92 | + function(Url $url) { |
|
93 | 93 | return $url->toString(); |
94 | 94 | }, |
95 | 95 | $contactPoint->getUrls()->toArray() |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function serialize(): array |
28 | 28 | { |
29 | 29 | return parent::serialize() + [ |
30 | - 'website' => (string) $this->getWebsite(), |
|
30 | + 'website' => (string)$this->getWebsite(), |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 |
@@ -55,8 +55,8 @@ |
||
55 | 55 | { |
56 | 56 | return parent::serialize() + [ |
57 | 57 | 'main_language' => $this->getMainLanguage()->getCode(), |
58 | - 'website' => (string) $this->getWebsite(), |
|
59 | - 'title' => (string) $this->getTitle(), |
|
58 | + 'website' => (string)$this->getWebsite(), |
|
59 | + 'title' => (string)$this->getTitle(), |
|
60 | 60 | ]; |
61 | 61 | } |
62 | 62 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function serialize(): array |
25 | 25 | { |
26 | 26 | return [ |
27 | - 'organizer_id' => $this->organizerId, |
|
27 | + 'organizer_id' => $this->organizerId, |
|
28 | 28 | ]; |
29 | 29 | } |
30 | 30 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | public function serialize(): array |
45 | 45 | { |
46 | 46 | return parent::serialize() + [ |
47 | - 'label' => (string) $this->label, |
|
47 | + 'label' => (string)$this->label, |
|
48 | 48 | 'visibility' => $this->label->isVisible(), |
49 | 49 | ]; |
50 | 50 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $this->endDate = $endDate; |
82 | 82 | $this->openingHours = $openingHours; |
83 | 83 | |
84 | - usort($timestamps, static function (Timestamp $timestamp, Timestamp $otherTimestamp) { |
|
84 | + usort($timestamps, static function(Timestamp $timestamp, Timestamp $otherTimestamp) { |
|
85 | 85 | return $timestamp->getStartDate() <=> $otherTimestamp->getStartDate(); |
86 | 86 | }); |
87 | 87 | |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | public function serialize(): array |
98 | 98 | { |
99 | 99 | $serializedTimestamps = array_map( |
100 | - function (Timestamp $timestamp) { |
|
100 | + function(Timestamp $timestamp) { |
|
101 | 101 | return $timestamp->serialize(); |
102 | 102 | }, |
103 | 103 | $this->timestamps |
104 | 104 | ); |
105 | 105 | |
106 | 106 | $serializedOpeningHours = array_map( |
107 | - function (OpeningHour $openingHour) { |
|
107 | + function(OpeningHour $openingHour) { |
|
108 | 108 | return $openingHour->serialize(); |
109 | 109 | }, |
110 | 110 | $this->openingHours |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null, |
142 | 142 | !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null, |
143 | 143 | !empty($data['timestamps']) ? array_map( |
144 | - function ($timestamp) { |
|
144 | + function($timestamp) { |
|
145 | 145 | return Timestamp::deserialize($timestamp); |
146 | 146 | }, |
147 | 147 | $data['timestamps'] |
148 | 148 | ) : $defaultTimeStamps, |
149 | 149 | !empty($data['openingHours']) ? array_map( |
150 | - function ($openingHour) { |
|
150 | + function($openingHour) { |
|
151 | 151 | return OpeningHour::deserialize($openingHour); |
152 | 152 | }, |
153 | 153 | $data['openingHours'] |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | if ($calendar instanceof CalendarWithSubEvents) { |
288 | 288 | $timestamps = array_map( |
289 | - function (DateRange $dateRange) { |
|
289 | + function(DateRange $dateRange) { |
|
290 | 290 | return Timestamp::fromUdb3ModelDateRange($dateRange); |
291 | 291 | }, |
292 | 292 | $calendar->getSubEvents()->toArray() |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | |
296 | 296 | if ($calendar instanceof CalendarWithOpeningHours) { |
297 | 297 | $openingHours = array_map( |
298 | - function (Udb3ModelOpeningHour $openingHour) { |
|
298 | + function(Udb3ModelOpeningHour $openingHour) { |
|
299 | 299 | return OpeningHour::fromUdb3ModelOpeningHour($openingHour); |
300 | 300 | }, |
301 | 301 | $calendar->getOpeningHours()->toArray() |
@@ -65,10 +65,10 @@ |
||
65 | 65 | public function serialize(): array |
66 | 66 | { |
67 | 67 | return [ |
68 | - 'streetAddress' => $this->streetAddress->toNative(), |
|
69 | - 'postalCode' => $this->postalCode->toNative(), |
|
70 | - 'addressLocality' => $this->locality->toNative(), |
|
71 | - 'addressCountry' => $this->countryCode, |
|
68 | + 'streetAddress' => $this->streetAddress->toNative(), |
|
69 | + 'postalCode' => $this->postalCode->toNative(), |
|
70 | + 'addressLocality' => $this->locality->toNative(), |
|
71 | + 'addressCountry' => $this->countryCode, |
|
72 | 72 | ]; |
73 | 73 | } |
74 | 74 |
@@ -56,9 +56,9 @@ |
||
56 | 56 | public function serialize(): array |
57 | 57 | { |
58 | 58 | return [ |
59 | - 'id' => $this->id, |
|
60 | - 'label' => $this->label, |
|
61 | - 'domain' => $this->domain, |
|
59 | + 'id' => $this->id, |
|
60 | + 'label' => $this->label, |
|
61 | + 'domain' => $this->domain, |
|
62 | 62 | ]; |
63 | 63 | } |
64 | 64 |