@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | |
59 | 59 | $prefixedTerms = array_filter( |
60 | 60 | $properties, |
61 | - function ($property) use ($termPrefix) { |
|
61 | + function($property) use ($termPrefix) { |
|
62 | 62 | return strpos($property, $termPrefix) === 0; |
63 | 63 | } |
64 | 64 | ); |
65 | - $terms = array_map(function ($term) use ($termPrefix) { |
|
65 | + $terms = array_map(function($term) use ($termPrefix) { |
|
66 | 66 | return str_replace($termPrefix, "", $term); |
67 | 67 | }, $prefixedTerms); |
68 | 68 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | if (property_exists($eventObject, 'terms') && $includedTerms) { |
87 | 87 | $filteredTerms = array_filter( |
88 | 88 | $eventObject->terms, |
89 | - function ($term) use ($includedTerms) { |
|
89 | + function($term) use ($includedTerms) { |
|
90 | 90 | return in_array($term->domain, $includedTerms); |
91 | 91 | } |
92 | 92 | ); |
@@ -140,14 +140,14 @@ discard block |
||
140 | 140 | protected function columns() |
141 | 141 | { |
142 | 142 | $formatter = $this; |
143 | - $contactPoint = function (\stdClass $event, $type = null) use ($formatter) { |
|
143 | + $contactPoint = function(\stdClass $event, $type = null) use ($formatter) { |
|
144 | 144 | return $formatter->contactPoint($event, $type); |
145 | 145 | }; |
146 | 146 | |
147 | 147 | return [ |
148 | 148 | 'id' => [ |
149 | 149 | 'name' => 'id', |
150 | - 'include' => function ($event) { |
|
150 | + 'include' => function($event) { |
|
151 | 151 | $eventUri = $event->{'@id'}; |
152 | 152 | $uriParts = explode('/', $eventUri); |
153 | 153 | $eventId = array_pop($uriParts); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | ], |
159 | 159 | 'name' => [ |
160 | 160 | 'name' => 'titel', |
161 | - 'include' => function ($event) { |
|
161 | + 'include' => function($event) { |
|
162 | 162 | if ($event->name) { |
163 | 163 | return reset($event->name); |
164 | 164 | } |
@@ -167,14 +167,14 @@ discard block |
||
167 | 167 | ], |
168 | 168 | 'creator' => [ |
169 | 169 | 'name' => 'auteur', |
170 | - 'include' => function ($event) { |
|
170 | + 'include' => function($event) { |
|
171 | 171 | return $event->creator; |
172 | 172 | }, |
173 | 173 | 'property' => 'creator' |
174 | 174 | ], |
175 | 175 | 'bookingInfo.price' => [ |
176 | 176 | 'name' => 'prijs', |
177 | - 'include' => function ($event) { |
|
177 | + 'include' => function($event) { |
|
178 | 178 | if (property_exists($event, 'bookingInfo')) { |
179 | 179 | $first = reset($event->bookingInfo); |
180 | 180 | if (is_object($first) && property_exists($first, 'price')) { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | ], |
187 | 187 | 'bookingInfo.url' => [ |
188 | 188 | 'name' => 'ticket link', |
189 | - 'include' => function ($event) { |
|
189 | + 'include' => function($event) { |
|
190 | 190 | if (property_exists($event, 'bookingInfo')) { |
191 | 191 | $first = reset($event->bookingInfo); |
192 | 192 | if (is_object($first) && property_exists($first, 'url')) { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | ], |
199 | 199 | 'description' => [ |
200 | 200 | 'name' => 'omschrijving', |
201 | - 'include' => function ($event) { |
|
201 | + 'include' => function($event) { |
|
202 | 202 | if (property_exists($event, 'description')) { |
203 | 203 | $description = reset($event->description); |
204 | 204 | return $this->htmlFilter->filter($description); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | ], |
209 | 209 | 'organizer' => [ |
210 | 210 | 'name' => 'organisatie', |
211 | - 'include' => function ($event) { |
|
211 | + 'include' => function($event) { |
|
212 | 212 | if (property_exists($event, 'organizer') && |
213 | 213 | isset($event->organizer->name) |
214 | 214 | ) { |
@@ -219,14 +219,14 @@ discard block |
||
219 | 219 | ], |
220 | 220 | 'calendarSummary' => [ |
221 | 221 | 'name' => 'tijdsinformatie', |
222 | - 'include' => function ($event) { |
|
222 | + 'include' => function($event) { |
|
223 | 223 | return $event->calendarSummary; |
224 | 224 | }, |
225 | 225 | 'property' => 'calendarSummary' |
226 | 226 | ], |
227 | 227 | 'labels' => [ |
228 | 228 | 'name' => 'labels', |
229 | - 'include' => function ($event) { |
|
229 | + 'include' => function($event) { |
|
230 | 230 | if (isset($event->labels)) { |
231 | 231 | return implode(';', $event->labels); |
232 | 232 | } |
@@ -235,14 +235,14 @@ discard block |
||
235 | 235 | ], |
236 | 236 | 'typicalAgeRange' => [ |
237 | 237 | 'name' => 'leeftijd', |
238 | - 'include' => function ($event) { |
|
238 | + 'include' => function($event) { |
|
239 | 239 | return $event->typicalAgeRange; |
240 | 240 | }, |
241 | 241 | 'property' => 'typicalAgeRange' |
242 | 242 | ], |
243 | 243 | 'performer' => [ |
244 | 244 | 'name' => 'uitvoerders', |
245 | - 'include' => function ($event) { |
|
245 | + 'include' => function($event) { |
|
246 | 246 | if (property_exists($event, 'performer')) { |
247 | 247 | $performerNames = []; |
248 | 248 | foreach ($event->performer as $performer) { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | ], |
257 | 257 | 'language' => [ |
258 | 258 | 'name' => 'taal van het aanbod', |
259 | - 'include' => function ($event) { |
|
259 | + 'include' => function($event) { |
|
260 | 260 | if (property_exists($event, 'language')) { |
261 | 261 | return implode(';', $event->language); |
262 | 262 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | ], |
266 | 266 | 'terms.theme' => [ |
267 | 267 | 'name' => 'thema', |
268 | - 'include' => function ($event) { |
|
268 | + 'include' => function($event) { |
|
269 | 269 | if (property_exists($event, 'terms')) { |
270 | 270 | foreach ($event->terms as $term) { |
271 | 271 | if ($term->domain && $term->label && $term->domain == 'theme') { |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | ], |
279 | 279 | 'terms.eventtype' => [ |
280 | 280 | 'name' => 'soort aanbod', |
281 | - 'include' => function ($event) { |
|
281 | + 'include' => function($event) { |
|
282 | 282 | if (property_exists($event, 'terms')) { |
283 | 283 | foreach ($event->terms as $term) { |
284 | 284 | if ($term->domain && $term->label && $term->domain == 'eventtype') { |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | ], |
292 | 292 | 'created' => [ |
293 | 293 | 'name' => 'datum aangemaakt', |
294 | - 'include' => function ($event) { |
|
294 | + 'include' => function($event) { |
|
295 | 295 | if (!empty($event->created)) { |
296 | 296 | return $this->formatDate($event->created); |
297 | 297 | } else { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | ], |
303 | 303 | 'modified' => [ |
304 | 304 | 'name' => 'datum laatste aanpassing', |
305 | - 'include' => function ($event) { |
|
305 | + 'include' => function($event) { |
|
306 | 306 | if (!empty($event->modified)) { |
307 | 307 | return $this->formatDate($event->modified); |
308 | 308 | } else { |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | ], |
314 | 314 | 'available' => [ |
315 | 315 | 'name' => 'embargodatum', |
316 | - 'include' => function ($event) { |
|
316 | + 'include' => function($event) { |
|
317 | 317 | if (!empty($event->available)) { |
318 | 318 | return $this->formatDateWithoutTime($event->available); |
319 | 319 | } else { |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | ], |
325 | 325 | 'startDate' => [ |
326 | 326 | 'name' => 'startdatum', |
327 | - 'include' => function ($event) { |
|
327 | + 'include' => function($event) { |
|
328 | 328 | if (!empty($event->startDate)) { |
329 | 329 | return $this->formatDate($event->startDate); |
330 | 330 | } else { |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | ], |
336 | 336 | 'endDate' => [ |
337 | 337 | 'name' => 'einddatum', |
338 | - 'include' => function ($event) { |
|
338 | + 'include' => function($event) { |
|
339 | 339 | if (!empty($event->endDate)) { |
340 | 340 | return $this->formatDate($event->endDate); |
341 | 341 | } else { |
@@ -346,14 +346,14 @@ discard block |
||
346 | 346 | ], |
347 | 347 | 'calendarType' => [ |
348 | 348 | 'name' => 'tijd type', |
349 | - 'include' => function ($event) { |
|
349 | + 'include' => function($event) { |
|
350 | 350 | return $event->calendarType; |
351 | 351 | }, |
352 | 352 | 'property' => 'calendarType' |
353 | 353 | ], |
354 | 354 | 'location' => [ |
355 | 355 | 'name' => 'locatie naam', |
356 | - 'include' => function ($event) { |
|
356 | + 'include' => function($event) { |
|
357 | 357 | if (property_exists($event, 'location') && isset($event->location->name)) { |
358 | 358 | return $event->location->name; |
359 | 359 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | ], |
363 | 363 | 'address.streetAddress' => [ |
364 | 364 | 'name' => 'straat', |
365 | - 'include' => function ($event) { |
|
365 | + 'include' => function($event) { |
|
366 | 366 | if (isset($event->location->address->streetAddress)) { |
367 | 367 | return $event->location->address->streetAddress; |
368 | 368 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | ], |
372 | 372 | 'address.postalCode' => [ |
373 | 373 | 'name' => 'postcode', |
374 | - 'include' => function ($event) { |
|
374 | + 'include' => function($event) { |
|
375 | 375 | if (isset($event->location->address->postalCode)) { |
376 | 376 | return $event->location->address->postalCode; |
377 | 377 | } |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | ], |
381 | 381 | 'address.addressLocality' => [ |
382 | 382 | 'name' => 'gemeente', |
383 | - 'include' => function ($event) { |
|
383 | + 'include' => function($event) { |
|
384 | 384 | if (isset($event->location->address->addressLocality)) { |
385 | 385 | return $event->location->address->addressLocality; |
386 | 386 | } |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | ], |
390 | 390 | 'address.addressCountry' => [ |
391 | 391 | 'name' => 'land', |
392 | - 'include' => function ($event) { |
|
392 | + 'include' => function($event) { |
|
393 | 393 | if (isset($event->location->address->addressCountry)) { |
394 | 394 | return $event->location->address->addressCountry; |
395 | 395 | } |
@@ -398,14 +398,14 @@ discard block |
||
398 | 398 | ], |
399 | 399 | 'image' => [ |
400 | 400 | 'name' => 'afbeelding', |
401 | - 'include' => function ($event) { |
|
401 | + 'include' => function($event) { |
|
402 | 402 | return !empty($event->image) ? $event->image : ''; |
403 | 403 | }, |
404 | 404 | 'property' => 'image' |
405 | 405 | ], |
406 | 406 | 'sameAs' => [ |
407 | 407 | 'name' => 'externe ids', |
408 | - 'include' => function ($event) { |
|
408 | + 'include' => function($event) { |
|
409 | 409 | if (property_exists($event, 'sameAs')) { |
410 | 410 | $ids = array(); |
411 | 411 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | ], |
421 | 421 | 'contactPoint.email' => [ |
422 | 422 | 'name' => 'e-mail', |
423 | - 'include' => function ($event) use ($contactPoint) { |
|
423 | + 'include' => function($event) use ($contactPoint) { |
|
424 | 424 | $contact = $contactPoint($event); |
425 | 425 | if (property_exists($contact, 'email')) { |
426 | 426 | return implode("\r\n", $contact->email); |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | ], |
431 | 431 | 'contactPoint.telephone' => [ |
432 | 432 | 'name' => 'telefoon', |
433 | - 'include' => function ($event) use ($contactPoint) { |
|
433 | + 'include' => function($event) use ($contactPoint) { |
|
434 | 434 | $contact = $contactPoint($event); |
435 | 435 | if (property_exists($contact, 'telephone')) { |
436 | 436 | return implode("\r\n", $contact->telephone); |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | ], |
441 | 441 | 'contactPoint.reservations.email' => [ |
442 | 442 | 'name' => 'e-mail reservaties', |
443 | - 'include' => function ($event) use ($contactPoint) { |
|
443 | + 'include' => function($event) use ($contactPoint) { |
|
444 | 444 | $contact = $contactPoint($event, 'Reservations'); |
445 | 445 | if (property_exists($contact, 'email')) { |
446 | 446 | return implode("\r\n", $contact->email); |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | ], |
451 | 451 | 'contactPoint.reservations.telephone' => [ |
452 | 452 | 'name' => 'telefoon reservaties', |
453 | - 'include' => function ($event) use ($contactPoint) { |
|
453 | + 'include' => function($event) use ($contactPoint) { |
|
454 | 454 | $contact = $contactPoint($event, 'Reservations'); |
455 | 455 | if (property_exists($contact, 'telephone')) { |
456 | 456 | return implode("\r\n", $contact->telephone); |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: nicolas |
|
5 | - * Date: 09/10/15 |
|
6 | - * Time: 13:39 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: nicolas |
|
5 | + * Date: 09/10/15 |
|
6 | + * Time: 13:39 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace CultuurNet\UDB3; |
10 | 10 |
@@ -33,8 +33,8 @@ |
||
33 | 33 | public function equals(Label $label) |
34 | 34 | { |
35 | 35 | return strcmp( |
36 | - mb_strtolower((string) $this, 'UTF-8'), |
|
37 | - mb_strtolower((string) $label, 'UTF-8') |
|
36 | + mb_strtolower((string)$this, 'UTF-8'), |
|
37 | + mb_strtolower((string)$label, 'UTF-8') |
|
38 | 38 | ) == 0; |
39 | 39 | } |
40 | 40 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @file |
|
4 | - */ |
|
3 | + * @file |
|
4 | + */ |
|
5 | 5 | |
6 | 6 | namespace CultuurNet\UDB3\Variations; |
7 | 7 |
@@ -92,14 +92,14 @@ |
||
92 | 92 | public function serialize() |
93 | 93 | { |
94 | 94 | return [ |
95 | - 'cdbid' => $this->cdbid, |
|
96 | - 'name' => $this->name, |
|
97 | - 'address' => [ |
|
95 | + 'cdbid' => $this->cdbid, |
|
96 | + 'name' => $this->name, |
|
97 | + 'address' => [ |
|
98 | 98 | 'addressCountry' => $this->country, |
99 | 99 | 'addressLocality' => $this->locality, |
100 | 100 | 'postalCode' => $this->postalcode, |
101 | 101 | 'streetAddress' => $this->street, |
102 | - ] |
|
102 | + ] |
|
103 | 103 | ]; |
104 | 104 | } |
105 | 105 |
@@ -88,11 +88,11 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | return parent::serialize() + array( |
91 | - 'title' => (string) $this->getTitle(), |
|
92 | - 'addresses' => $addresses, |
|
93 | - 'phones' => $this->getPhones(), |
|
94 | - 'emails' => $this->getEmails(), |
|
95 | - 'urls' => $this->getUrls(), |
|
91 | + 'title' => (string) $this->getTitle(), |
|
92 | + 'addresses' => $addresses, |
|
93 | + 'phones' => $this->getPhones(), |
|
94 | + 'emails' => $this->getEmails(), |
|
95 | + 'urls' => $this->getUrls(), |
|
96 | 96 | ); |
97 | 97 | } |
98 | 98 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | return parent::serialize() + array( |
91 | - 'title' => (string) $this->getTitle(), |
|
91 | + 'title' => (string)$this->getTitle(), |
|
92 | 92 | 'addresses' => $addresses, |
93 | 93 | 'phones' => $this->getPhones(), |
94 | 94 | 'emails' => $this->getEmails(), |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public function serialize() |
34 | 34 | { |
35 | 35 | return array( |
36 | - 'organizer_id' => $this->organizerId, |
|
36 | + 'organizer_id' => $this->organizerId, |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public function serialize() |
34 | 34 | { |
35 | 35 | return parent::serialize() + array( |
36 | - 'organizerId' => $this->organizerId, |
|
36 | + 'organizerId' => $this->organizerId, |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 | } |
@@ -113,7 +113,7 @@ |
||
113 | 113 | $theme = $this->getTheme()->serialize(); |
114 | 114 | } |
115 | 115 | return parent::serialize() + array( |
116 | - 'title' => (string) $this->getTitle(), |
|
116 | + 'title' => (string)$this->getTitle(), |
|
117 | 117 | 'event_type' => $this->getEventType()->serialize(), |
118 | 118 | 'theme' => $theme, |
119 | 119 | 'address' => $this->getAddress()->serialize(), |