@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function getItemId() |
| 37 | 37 | { |
| 38 | - return (string) $this->getUuid(); |
|
| 38 | + return (string)$this->getUuid(); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | |
| 591 | 591 | $this->themes = array_reduce( |
| 592 | 592 | $themePerType, |
| 593 | - function ($themes, array $type) { |
|
| 593 | + function($themes, array $type) { |
|
| 594 | 594 | if (array_key_exists('themes', $type)) { |
| 595 | 595 | foreach ($type['themes'] as $themeData) { |
| 596 | 596 | $themes[$themeData['id']] = new Theme($themeData['id'], $themeData['label']); |
@@ -608,9 +608,9 @@ discard block |
||
| 608 | 608 | */ |
| 609 | 609 | public function byId(StringLiteral $themeId) |
| 610 | 610 | { |
| 611 | - if (!array_key_exists((string) $themeId, $this->themes)) { |
|
| 612 | - throw new \Exception("Unknown event theme id: " . $themeId); |
|
| 611 | + if (!array_key_exists((string)$themeId, $this->themes)) { |
|
| 612 | + throw new \Exception("Unknown event theme id: ".$themeId); |
|
| 613 | 613 | } |
| 614 | - return $this->themes[(string) $themeId]; |
|
| 614 | + return $this->themes[(string)$themeId]; |
|
| 615 | 615 | } |
| 616 | 616 | } |
@@ -43,9 +43,9 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function byId(StringLiteral $typeId) |
| 45 | 45 | { |
| 46 | - if (!array_key_exists((string) $typeId, $this->types)) { |
|
| 47 | - throw new \Exception("Unknown event type id: " . $typeId); |
|
| 46 | + if (!array_key_exists((string)$typeId, $this->types)) { |
|
| 47 | + throw new \Exception("Unknown event type id: ".$typeId); |
|
| 48 | 48 | } |
| 49 | - return $this->types[(string) $typeId]; |
|
| 49 | + return $this->types[(string)$typeId]; |
|
| 50 | 50 | } |
| 51 | 51 | } |
@@ -41,9 +41,9 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function byId(StringLiteral $typeId) |
| 43 | 43 | { |
| 44 | - if (!array_key_exists((string) $typeId, $this->types)) { |
|
| 45 | - throw new \Exception("Unknown place type id: " . $typeId); |
|
| 44 | + if (!array_key_exists((string)$typeId, $this->types)) { |
|
| 45 | + throw new \Exception("Unknown place type id: ".$typeId); |
|
| 46 | 46 | } |
| 47 | - return $this->types[(string) $typeId]; |
|
| 47 | + return $this->types[(string)$typeId]; |
|
| 48 | 48 | } |
| 49 | 49 | } |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function byId(StringLiteral $themeId) |
| 25 | 25 | { |
| 26 | - if (!array_key_exists((string) $themeId, $this->themes)) { |
|
| 27 | - throw new \Exception("Unknown place theme id: " . $themeId); |
|
| 26 | + if (!array_key_exists((string)$themeId, $this->themes)) { |
|
| 27 | + throw new \Exception("Unknown place theme id: ".$themeId); |
|
| 28 | 28 | } |
| 29 | - return $this->themes[(string) $themeId]; |
|
| 29 | + return $this->themes[(string)$themeId]; |
|
| 30 | 30 | } |
| 31 | 31 | } |
@@ -241,7 +241,7 @@ |
||
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | 243 | * @param PlaceDeleted $placeDeleted |
| 244 | - * @return null |
|
| 244 | + * @return JsonDocument |
|
| 245 | 245 | */ |
| 246 | 246 | protected function applyPlaceDeleted(PlaceDeleted $placeDeleted) |
| 247 | 247 | { |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | ); |
| 205 | 205 | |
| 206 | 206 | $calendarJsonLD = $placeCreated->getCalendar()->toJsonLd(); |
| 207 | - $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD); |
|
| 207 | + $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD); |
|
| 208 | 208 | |
| 209 | 209 | $availableTo = AvailableTo::createFromCalendar($placeCreated->getCalendar()); |
| 210 | 210 | $jsonLD->availableTo = (string)$availableTo; |
@@ -279,8 +279,8 @@ discard block |
||
| 279 | 279 | $jsonLD->availableTo = (string)$availableTo; |
| 280 | 280 | |
| 281 | 281 | // Remove old theme and event type. |
| 282 | - $jsonLD->terms = array_filter($jsonLD->terms, function ($term) { |
|
| 283 | - return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
| 282 | + $jsonLD->terms = array_filter($jsonLD->terms, function($term) { |
|
| 283 | + return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
| 284 | 284 | }); |
| 285 | 285 | |
| 286 | 286 | $eventType = $majorInfoUpdated->getEventType(); |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | // @replay_i18n |
| 347 | 347 | // @see https://jira.uitdatabank.be/browse/III-2201 |
| 348 | 348 | $mainLanguageCode = $this->getMainLanguage($jsonLd)->getCode(); |
| 349 | - $jsonLd->address = (object) [ |
|
| 349 | + $jsonLd->address = (object)[ |
|
| 350 | 350 | $mainLanguageCode => $jsonLd->address, |
| 351 | 351 | ]; |
| 352 | 352 | } |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | $placeLd = $document->getBody(); |
| 366 | 366 | |
| 367 | - $placeLd->geo = (object) [ |
|
| 367 | + $placeLd->geo = (object)[ |
|
| 368 | 368 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
| 369 | 369 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
| 370 | 370 | ]; |
@@ -13,7 +13,6 @@ discard block |
||
| 13 | 13 | use CultuurNet\UDB3\Event\ReadModel\DocumentGoneException; |
| 14 | 14 | use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface; |
| 15 | 15 | use CultuurNet\UDB3\EventListener\EventSpecification; |
| 16 | -use CultuurNet\UDB3\Facility; |
|
| 17 | 16 | use CultuurNet\UDB3\Iri\IriGeneratorInterface; |
| 18 | 17 | use CultuurNet\UDB3\Language; |
| 19 | 18 | use CultuurNet\UDB3\Offer\AvailableTo; |
@@ -56,7 +55,6 @@ discard block |
||
| 56 | 55 | use CultuurNet\UDB3\Place\Events\TypeUpdated; |
| 57 | 56 | use CultuurNet\UDB3\Place\Events\TypicalAgeRangeDeleted; |
| 58 | 57 | use CultuurNet\UDB3\Place\Events\TypicalAgeRangeUpdated; |
| 59 | -use CultuurNet\UDB3\Place\PlaceEvent; |
|
| 60 | 58 | use CultuurNet\UDB3\ReadModel\JsonDocument; |
| 61 | 59 | use CultuurNet\UDB3\ReadModel\JsonDocumentMetaDataEnricherInterface; |
| 62 | 60 | use CultuurNet\UDB3\Theme; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | $this->setMainLanguage($jsonLD, new Language('nl')); |
| 215 | 215 | |
| 216 | - $jsonLD->url = (string) $organizerCreated->getWebsite(); |
|
| 216 | + $jsonLD->url = (string)$organizerCreated->getWebsite(); |
|
| 217 | 217 | |
| 218 | 218 | $jsonLD->name = [ |
| 219 | 219 | $this->getMainLanguage($jsonLD)->getCode() => $organizerCreated->getTitle(), |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $document = $this->repository->get($organizerId); |
| 245 | 245 | |
| 246 | 246 | $jsonLD = $document->getBody(); |
| 247 | - $jsonLD->url = (string) $websiteUpdated->getWebsite(); |
|
| 247 | + $jsonLD->url = (string)$websiteUpdated->getWebsite(); |
|
| 248 | 248 | |
| 249 | 249 | return $document->withBody($jsonLD); |
| 250 | 250 | } |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels'; |
| 353 | 353 | |
| 354 | 354 | $labels = isset($jsonLD->{$labelsProperty}) ? $jsonLD->{$labelsProperty} : []; |
| 355 | - $label = (string) $labelAdded->getLabel(); |
|
| 355 | + $label = (string)$labelAdded->getLabel(); |
|
| 356 | 356 | |
| 357 | 357 | $labels[] = $label; |
| 358 | 358 | $jsonLD->{$labelsProperty} = array_unique($labels); |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | if (isset($jsonLD->{$labelsProperty}) && is_array($jsonLD->{$labelsProperty})) { |
| 377 | 377 | $jsonLD->{$labelsProperty} = array_filter( |
| 378 | 378 | $jsonLD->{$labelsProperty}, |
| 379 | - function ($label) use ($labelRemoved) { |
|
| 379 | + function($label) use ($labelRemoved) { |
|
| 380 | 380 | return !$labelRemoved->getLabel()->equals( |
| 381 | 381 | new Label($label) |
| 382 | 382 | ); |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | private function applyOrganizerDeleted( |
| 404 | 404 | OrganizerDeleted $organizerDeleted |
| 405 | 405 | ) { |
| 406 | - $document = $this->repository->get($organizerDeleted->getOrganizerId()); |
|
| 406 | + $document = $this->repository->get($organizerDeleted->getOrganizerId()); |
|
| 407 | 407 | |
| 408 | 408 | $jsonLD = $document->getBody(); |
| 409 | 409 | |
@@ -24,6 +24,7 @@ discard block |
||
| 24 | 24 | * @param string $id |
| 25 | 25 | * @param Language $language |
| 26 | 26 | * @param StringLiteral $title |
| 27 | + * @return string |
|
| 27 | 28 | */ |
| 28 | 29 | public function updateTitle($id, Language $language, StringLiteral $title); |
| 29 | 30 | |
@@ -33,6 +34,7 @@ discard block |
||
| 33 | 34 | * @param string $id |
| 34 | 35 | * @param Language $language |
| 35 | 36 | * @param Description $description |
| 37 | + * @return string |
|
| 36 | 38 | */ |
| 37 | 39 | public function updateDescription($id, Language $language, Description $description); |
| 38 | 40 | |
@@ -41,6 +43,7 @@ discard block |
||
| 41 | 43 | * |
| 42 | 44 | * @param string $id |
| 43 | 45 | * @param AgeRange $ageRange |
| 46 | + * @return string |
|
| 44 | 47 | */ |
| 45 | 48 | public function updateTypicalAgeRange($id, AgeRange $ageRange); |
| 46 | 49 | |
@@ -48,6 +51,7 @@ discard block |
||
| 48 | 51 | * Delete the typical age range of a place. |
| 49 | 52 | * |
| 50 | 53 | * @param string $id |
| 54 | + * @return string |
|
| 51 | 55 | */ |
| 52 | 56 | public function deleteTypicalAgeRange($id); |
| 53 | 57 | |
@@ -56,6 +60,7 @@ discard block |
||
| 56 | 60 | * |
| 57 | 61 | * @param string $id |
| 58 | 62 | * @param string $organizerId |
| 63 | + * @return string |
|
| 59 | 64 | */ |
| 60 | 65 | public function updateOrganizer($id, $organizerId); |
| 61 | 66 | |
@@ -64,6 +69,7 @@ discard block |
||
| 64 | 69 | * |
| 65 | 70 | * @param string $id |
| 66 | 71 | * @param string $organizerId |
| 72 | + * @return string |
|
| 67 | 73 | */ |
| 68 | 74 | public function deleteOrganizer($id, $organizerId); |
| 69 | 75 | |
@@ -72,6 +78,7 @@ discard block |
||
| 72 | 78 | * |
| 73 | 79 | * @param string $id |
| 74 | 80 | * @param ContactPoint $contactPoint |
| 81 | + * @return string |
|
| 75 | 82 | */ |
| 76 | 83 | public function updateContactPoint($id, ContactPoint $contactPoint); |
| 77 | 84 | |
@@ -80,6 +87,7 @@ discard block |
||
| 80 | 87 | * |
| 81 | 88 | * @param string $id |
| 82 | 89 | * @param UUID $imageId |
| 90 | + * @return string |
|
| 83 | 91 | */ |
| 84 | 92 | public function addImage($id, UUID $imageId); |
| 85 | 93 | |
@@ -106,6 +114,7 @@ discard block |
||
| 106 | 114 | * |
| 107 | 115 | * @param string $id |
| 108 | 116 | * @param Image $image |
| 117 | + * @return string |
|
| 109 | 118 | */ |
| 110 | 119 | public function removeImage($id, Image $image); |
| 111 | 120 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @param array $data |
| 35 | - * @return mixed The object instance |
|
| 35 | + * @return AbstractFacilitiesUpdated The object instance |
|
| 36 | 36 | */ |
| 37 | 37 | public static function deserialize(array $data) |
| 38 | 38 | { |