@@ -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(); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $offerLd = $document->getBody(); |
177 | 177 | |
178 | 178 | $labels = isset($offerLd->labels) ? $offerLd->labels : []; |
179 | - $label = (string) $labelAdded->getLabel(); |
|
179 | + $label = (string)$labelAdded->getLabel(); |
|
180 | 180 | |
181 | 181 | $labels[] = $label; |
182 | 182 | $offerLd->labels = array_unique($labels); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | if (is_array($offerLd->labels)) { |
197 | 197 | $offerLd->labels = array_filter( |
198 | 198 | $offerLd->labels, |
199 | - function ($label) use ($deleteLabel) { |
|
199 | + function($label) use ($deleteLabel) { |
|
200 | 200 | return !$deleteLabel->getLabel()->equals( |
201 | 201 | new Label($label) |
202 | 202 | ); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | return; |
288 | 288 | } |
289 | 289 | |
290 | - $imageId = (string) $imageRemoved->getImage()->getMediaObjectId(); |
|
290 | + $imageId = (string)$imageRemoved->getImage()->getMediaObjectId(); |
|
291 | 291 | |
292 | 292 | /** |
293 | 293 | * Matches any object that is not the removed image. |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * @return bool |
299 | 299 | * Returns true when the media object does not match the image to remove. |
300 | 300 | */ |
301 | - $shouldNotBeRemoved = function ($mediaObject) use ($imageId) { |
|
301 | + $shouldNotBeRemoved = function($mediaObject) use ($imageId) { |
|
302 | 302 | $containsId = !!strpos($mediaObject->{'@id'}, $imageId); |
303 | 303 | return !$containsId; |
304 | 304 | }; |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $document = $this->loadDocumentFromRepository($mainImageSelected); |
337 | 337 | $offerLd = $document->getBody(); |
338 | 338 | $imageId = $mainImageSelected->getImage()->getMediaObjectId(); |
339 | - $mediaObjectMatcher = function ($matchingMediaObject, $currentMediaObject) use ($imageId) { |
|
339 | + $mediaObjectMatcher = function($matchingMediaObject, $currentMediaObject) use ($imageId) { |
|
340 | 340 | if (!$matchingMediaObject && $this->mediaObjectMatchesId($currentMediaObject, $imageId)) { |
341 | 341 | $matchingMediaObject = $currentMediaObject; |
342 | 342 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | */ |
362 | 362 | protected function mediaObjectMatchesId($mediaObject, UUID $mediaObjectId) |
363 | 363 | { |
364 | - return strpos($mediaObject->{'@id'}, (string) $mediaObjectId) > 0; |
|
364 | + return strpos($mediaObject->{'@id'}, (string)$mediaObjectId) > 0; |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
57 | 57 | 'CultuurNet\UDB3\UsedKeywordsMemory\Created', |
58 | - function (array $serializedObject) { |
|
58 | + function(array $serializedObject) { |
|
59 | 59 | $serializedObject['class'] = UsedLabelsMemoryCreated::class; |
60 | 60 | |
61 | 61 | return $serializedObject; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
66 | 66 | 'CultuurNet\UDB3\UsedKeywordsMemory\KeywordUsed', |
67 | - function (array $serializedObject) { |
|
67 | + function(array $serializedObject) { |
|
68 | 68 | $serializedObject['class'] = LabelUsed::class; |
69 | 69 | |
70 | 70 | $serializedObject = self::replaceKeywordWithLabel($serializedObject); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
81 | 81 | 'CultuurNet\UDB3\Event\TitleTranslated', |
82 | - function (array $serializedObject) { |
|
82 | + function(array $serializedObject) { |
|
83 | 83 | $serializedObject['class'] = TitleTranslated::class; |
84 | 84 | |
85 | 85 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
92 | 92 | 'CultuurNet\UDB3\Event\DescriptionTranslated', |
93 | - function (array $serializedObject) { |
|
93 | + function(array $serializedObject) { |
|
94 | 94 | $serializedObject['class'] = DescriptionTranslated::class; |
95 | 95 | |
96 | 96 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
107 | 107 | 'CultuurNet\UDB3\Event\Events\EventWasLabelled', |
108 | - function (array $serializedObject) { |
|
108 | + function(array $serializedObject) { |
|
109 | 109 | $serializedObject['class'] = LabelAdded::class; |
110 | 110 | |
111 | 111 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
118 | 118 | 'CultuurNet\UDB3\Event\EventWasTagged', |
119 | - function (array $serializedObject) { |
|
119 | + function(array $serializedObject) { |
|
120 | 120 | $serializedObject['class'] = LabelAdded::class; |
121 | 121 | |
122 | 122 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
131 | 131 | 'CultuurNet\UDB3\Event\TagErased', |
132 | - function (array $serializedObject) { |
|
132 | + function(array $serializedObject) { |
|
133 | 133 | $serializedObject['class'] = LabelDeleted::class; |
134 | 134 | |
135 | 135 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
144 | 144 | 'CultuurNet\UDB3\Event\Events\Unlabelled', |
145 | - function (array $serializedObject) { |
|
145 | + function(array $serializedObject) { |
|
146 | 146 | $serializedObject['class'] = LabelDeleted::class; |
147 | 147 | |
148 | 148 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
155 | 155 | 'CultuurNet\UDB3\Event\Events\LabelsApplied', |
156 | - function (array $serializedObject) { |
|
156 | + function(array $serializedObject) { |
|
157 | 157 | $serializedObject['class'] = LabelsMerged::class; |
158 | 158 | |
159 | 159 | $keywordsString = $serializedObject['payload']['keywords_string']; |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | $labels = array_map( |
178 | - function (Label $label) { |
|
178 | + function(Label $label) { |
|
179 | 179 | return [ |
180 | - 'text' => (string) $label, |
|
180 | + 'text' => (string)$label, |
|
181 | 181 | 'visible' => $label->isVisible(), |
182 | 182 | ]; |
183 | 183 | }, |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
199 | 199 | 'CultuurNet\UDB3\Event\EventImportedFromUDB2', |
200 | - function (array $serializedObject) { |
|
200 | + function(array $serializedObject) { |
|
201 | 201 | $serializedObject['class'] = EventImportedFromUDB2::class; |
202 | 202 | |
203 | 203 | return $serializedObject; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | |
211 | 211 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
212 | 212 | BookingInfoUpdated::class, |
213 | - function (array $serializedObject) { |
|
213 | + function(array $serializedObject) { |
|
214 | 214 | |
215 | 215 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
216 | 216 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
226 | 226 | TypicalAgeRangeDeleted::class, |
227 | - function (array $serializedObject) { |
|
227 | + function(array $serializedObject) { |
|
228 | 228 | |
229 | 229 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
230 | 230 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
236 | 236 | TypicalAgeRangeUpdated::class, |
237 | - function (array $serializedObject) { |
|
237 | + function(array $serializedObject) { |
|
238 | 238 | |
239 | 239 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
240 | 240 | |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | |
249 | 249 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
250 | 250 | ContactPointUpdated::class, |
251 | - function (array $serializedObject) { |
|
251 | + function(array $serializedObject) { |
|
252 | 252 | |
253 | 253 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
254 | 254 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | |
263 | 263 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
264 | 264 | MajorInfoUpdated::class, |
265 | - function (array $serializedObject) { |
|
265 | + function(array $serializedObject) { |
|
266 | 266 | |
267 | 267 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
268 | 268 | |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | |
277 | 277 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
278 | 278 | OrganizerUpdated::class, |
279 | - function (array $serializedObject) { |
|
279 | + function(array $serializedObject) { |
|
280 | 280 | |
281 | 281 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
282 | 282 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
288 | 288 | OrganizerDeleted::class, |
289 | - function (array $serializedObject) { |
|
289 | + function(array $serializedObject) { |
|
290 | 290 | |
291 | 291 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
292 | 292 |