@@ -38,6 +38,13 @@ |
||
38 | 38 | */ |
39 | 39 | protected $availabilityEnds; |
40 | 40 | |
41 | + /** |
|
42 | + * @param MultilingualString $urlLabel |
|
43 | + * @param string $phone |
|
44 | + * @param string $email |
|
45 | + * @param DateTimeImmutable $availabilityStarts |
|
46 | + * @param DateTimeImmutable $availabilityEnds |
|
47 | + */ |
|
41 | 48 | public function __construct( |
42 | 49 | ?string $url = null, |
43 | 50 | ?MultilingualString $urlLabel = null, |
@@ -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 |