@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | Url::fromNative($destinationIri) |
116 | 116 | ); |
117 | 117 | |
118 | - $jobInfo = ['file_id' => (string) $uploadImage->getFileId()]; |
|
118 | + $jobInfo = ['file_id' => (string)$uploadImage->getFileId()]; |
|
119 | 119 | $this->logger->info('job_info', $jobInfo); |
120 | 120 | } |
121 | 121 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | public function get(UUID $fileId) |
126 | 126 | { |
127 | 127 | try { |
128 | - $mediaObject = $this->repository->load((string) $fileId); |
|
128 | + $mediaObject = $this->repository->load((string)$fileId); |
|
129 | 129 | } catch (AggregateNotFoundException $e) { |
130 | 130 | throw new MediaObjectNotFoundException( |
131 | 131 | sprintf("Media object with id '%s' not found", $fileId), |
@@ -109,11 +109,11 @@ |
||
109 | 109 | public function serialize() |
110 | 110 | { |
111 | 111 | return [ |
112 | - 'media_object_id' => (string) $this->getMediaObjectId(), |
|
113 | - 'mime_type' => (string) $this->getMimeType(), |
|
114 | - 'description' => (string) $this->getDescription(), |
|
115 | - 'copyright_holder' => (string) $this->getCopyrightHolder(), |
|
116 | - 'source_location' => (string) $this->getSourceLocation() |
|
112 | + 'media_object_id' => (string)$this->getMediaObjectId(), |
|
113 | + 'mime_type' => (string)$this->getMimeType(), |
|
114 | + 'description' => (string)$this->getDescription(), |
|
115 | + 'copyright_holder' => (string)$this->getCopyrightHolder(), |
|
116 | + 'source_location' => (string)$this->getSourceLocation() |
|
117 | 117 | ]; |
118 | 118 | } |
119 | 119 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | 'mime_type' => $this->getMimeType()->toNative(), |
108 | 108 | 'description' => $this->getDescription()->toNative(), |
109 | 109 | 'copyright_holder' => $this->getCopyrightHolder()->toNative(), |
110 | - 'source_location' => (string) $this->getSourceLocation() |
|
110 | + 'source_location' => (string)$this->getSourceLocation() |
|
111 | 111 | ); |
112 | 112 | } |
113 | 113 |
@@ -78,6 +78,9 @@ |
||
78 | 78 | return $document->getRawBody(); |
79 | 79 | } |
80 | 80 | |
81 | + /** |
|
82 | + * @param string $id |
|
83 | + */ |
|
81 | 84 | public function iri($id) |
82 | 85 | { |
83 | 86 | return $this->iriGenerator->iri($id); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
128 | - * @param $dateString |
|
128 | + * @param string $dateString |
|
129 | 129 | * @return \DateTime |
130 | 130 | */ |
131 | 131 | private function dateFromUdb2DateString($dateString) |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | /** |
353 | 353 | * @param string $eventId |
354 | - * @param Log[]|Log $logs |
|
354 | + * @param Log $logs |
|
355 | 355 | */ |
356 | 356 | protected function writeHistory($eventId, $logs) |
357 | 357 | { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function serialize() |
33 | 33 | { |
34 | 34 | return parent::serialize() + array( |
35 | - 'label' => (string) $this->label, |
|
35 | + 'label' => (string)$this->label, |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | /** |
370 | 370 | * Return the media of an event if it already exists. |
371 | 371 | * |
372 | - * @param $eventId |
|
372 | + * @param string $eventId |
|
373 | 373 | * The id of the event. |
374 | 374 | * |
375 | 375 | * @return array |
@@ -867,6 +867,9 @@ discard block |
||
867 | 867 | return $document; |
868 | 868 | } |
869 | 869 | |
870 | + /** |
|
871 | + * @param string $eventId |
|
872 | + */ |
|
870 | 873 | private function generateSameAs($eventId, $name) |
871 | 874 | { |
872 | 875 | $eventSlug = $this->slugger->slug($name); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | |
478 | 478 | $jsonLD->name->nl = $majorInfoUpdated->getTitle(); |
479 | 479 | $jsonLD->location = array( |
480 | - '@type' => 'Place', |
|
480 | + '@type' => 'Place', |
|
481 | 481 | ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid()); |
482 | 482 | |
483 | 483 | $calendarJsonLD = $majorInfoUpdated->getCalendar()->toJsonLd(); |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | $eventLd = $document->getBody(); |
684 | 684 | |
685 | 685 | $eventLd->organizer = array( |
686 | - '@type' => 'Organizer', |
|
686 | + '@type' => 'Organizer', |
|
687 | 687 | ) + (array)$this->organizerJSONLD($organizerUpdated->getOrganizerId()); |
688 | 688 | |
689 | 689 | $this->repository->save($document->withBody($eventLd)); |
@@ -6,13 +6,10 @@ discard block |
||
6 | 6 | use Broadway\Domain\DomainMessage; |
7 | 7 | use Broadway\Domain\Metadata; |
8 | 8 | use Broadway\EventHandling\EventListenerInterface; |
9 | -use CultuurNet\UDB3\Calendar; |
|
10 | -use CultuurNet\UDB3\CalendarInterface; |
|
11 | 9 | use CultuurNet\UDB3\Cdb\EventItemFactory; |
12 | 10 | use CultuurNet\UDB3\CulturefeedSlugger; |
13 | 11 | use CultuurNet\UDB3\EntityNotFoundException; |
14 | 12 | use CultuurNet\UDB3\Event\DescriptionTranslated; |
15 | -use CultuurNet\UDB3\Event\EventEvent; |
|
16 | 13 | use CultuurNet\UDB3\Event\Events\BookingInfoUpdated; |
17 | 14 | use CultuurNet\UDB3\Event\Events\ContactPointUpdated; |
18 | 15 | use CultuurNet\UDB3\Event\Events\DescriptionUpdated; |
@@ -41,21 +38,16 @@ discard block |
||
41 | 38 | use CultuurNet\UDB3\Event\ReadModel\JSONLD\OrganizerServiceInterface; |
42 | 39 | use CultuurNet\UDB3\Event\ReadModel\JSONLD\PlaceServiceInterface; |
43 | 40 | use CultuurNet\UDB3\Event\TitleTranslated; |
44 | -use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait; |
|
45 | 41 | use CultuurNet\UDB3\EventServiceInterface; |
46 | 42 | use CultuurNet\UDB3\Iri\IriGeneratorInterface; |
47 | -use CultuurNet\UDB3\Label; |
|
48 | 43 | use CultuurNet\UDB3\LabelCollection; |
49 | 44 | use CultuurNet\UDB3\Offer\ReadModel\JSONLD\CdbXMLItemBaseImporter; |
50 | 45 | use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferLDProjector; |
51 | -use CultuurNet\UDB3\Media\Serialization\MediaObjectSerializer; |
|
52 | 46 | use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferUpdate; |
53 | 47 | use CultuurNet\UDB3\Organizer\OrganizerProjectedToJSONLD; |
54 | 48 | use CultuurNet\UDB3\OrganizerService; |
55 | 49 | use CultuurNet\UDB3\Place\PlaceProjectedToJSONLD; |
56 | 50 | use CultuurNet\UDB3\PlaceService; |
57 | -use CultuurNet\UDB3\ReadModel\JsonDocument; |
|
58 | -use CultuurNet\UDB3\SluggerInterface; |
|
59 | 51 | use CultuurNet\UDB3\StringFilter\StringFilterInterface; |
60 | 52 | use CultuurNet\UDB3\Theme; |
61 | 53 | use Symfony\Component\Serializer\SerializerInterface; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | ) { |
269 | 269 | $this->saveNewDocument( |
270 | 270 | $eventId, |
271 | - function (\stdClass $eventLd) use ($eventId, $cdbXmlNamespaceUri, $cdbXml, $domainMessage) { |
|
271 | + function(\stdClass $eventLd) use ($eventId, $cdbXmlNamespaceUri, $cdbXml, $domainMessage) { |
|
272 | 272 | $eventLd = $this->projectEventCdbXmlToObject( |
273 | 273 | $eventLd, |
274 | 274 | $eventId, |
@@ -325,13 +325,13 @@ discard block |
||
325 | 325 | ) { |
326 | 326 | $this->saveNewDocument( |
327 | 327 | $eventId, |
328 | - function (\stdClass $eventLd) use ($cdbXmlNamespaceUri, $eventId, $cdbXml) { |
|
328 | + function(\stdClass $eventLd) use ($cdbXmlNamespaceUri, $eventId, $cdbXml) { |
|
329 | 329 | return $this->projectEventCdbXmlToObject( |
330 | 330 | $eventLd, |
331 | 331 | $eventId, |
332 | 332 | $cdbXmlNamespaceUri, |
333 | 333 | $cdbXml |
334 | - ) ; |
|
334 | + ); |
|
335 | 335 | } |
336 | 336 | ); |
337 | 337 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | ) { |
408 | 408 | $this->saveNewDocument( |
409 | 409 | $eventCreated->getEventId(), |
410 | - function (\stdClass $jsonLD) use ($eventCreated, $domainMessage) { |
|
410 | + function(\stdClass $jsonLD) use ($eventCreated, $domainMessage) { |
|
411 | 411 | $jsonLD->{'@id'} = $this->iriGenerator->iri( |
412 | 412 | $eventCreated->getEventId() |
413 | 413 | ); |
@@ -481,8 +481,8 @@ discard block |
||
481 | 481 | ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid()); |
482 | 482 | |
483 | 483 | // Remove old theme and event type. |
484 | - $jsonLD->terms = array_filter($jsonLD->terms, function ($term) { |
|
485 | - return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
484 | + $jsonLD->terms = array_filter($jsonLD->terms, function($term) { |
|
485 | + return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
486 | 486 | }); |
487 | 487 | |
488 | 488 | $eventType = $majorInfoUpdated->getEventType(); |
@@ -2,15 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace CultuurNet\UDB3\Place; |
4 | 4 | |
5 | -use Broadway\Repository\AggregateNotFoundException; |
|
6 | 5 | use CultuurNet\UDB3\Address; |
7 | 6 | use CultuurNet\UDB3\CalendarInterface; |
8 | 7 | use CultuurNet\UDB3\Event\EventType; |
9 | -use CultuurNet\UDB3\Label; |
|
10 | 8 | use CultuurNet\UDB3\Offer\DefaultOfferEditingService; |
11 | 9 | use CultuurNet\UDB3\OfferEditingInterface; |
12 | -use CultuurNet\UDB3\Place\Commands\AddLabel; |
|
13 | -use CultuurNet\UDB3\Place\Commands\DeleteLabel; |
|
14 | 10 | use CultuurNet\UDB3\Place\Commands\DeletePlace; |
15 | 11 | use CultuurNet\UDB3\Place\Commands\UpdateFacilities; |
16 | 12 | use CultuurNet\UDB3\Place\Commands\UpdateMajorInfo; |
@@ -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 |