@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $offerLd = $document->getBody(); |
| 158 | 158 | |
| 159 | 159 | $labels = isset($offerLd->labels) ? $offerLd->labels : []; |
| 160 | - $label = (string) $labelAdded->getLabel(); |
|
| 160 | + $label = (string)$labelAdded->getLabel(); |
|
| 161 | 161 | |
| 162 | 162 | $labels[] = $label; |
| 163 | 163 | $offerLd->labels = array_unique($labels); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | if (is_array($offerLd->labels)) { |
| 178 | 178 | $offerLd->labels = array_filter( |
| 179 | 179 | $offerLd->labels, |
| 180 | - function ($label) use ($deleteLabel) { |
|
| 180 | + function($label) use ($deleteLabel) { |
|
| 181 | 181 | return !$deleteLabel->getLabel()->equals( |
| 182 | 182 | new Label($label) |
| 183 | 183 | ); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | return; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | - $imageId = (string) $imageRemoved->getImage()->getMediaObjectId(); |
|
| 267 | + $imageId = (string)$imageRemoved->getImage()->getMediaObjectId(); |
|
| 268 | 268 | |
| 269 | 269 | /** |
| 270 | 270 | * Matches any object that is not the removed image. |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | * @return bool |
| 276 | 276 | * Returns true when the media object does not match the image to remove. |
| 277 | 277 | */ |
| 278 | - $shouldNotBeRemoved = function ($mediaObject) use ($imageId) { |
|
| 278 | + $shouldNotBeRemoved = function($mediaObject) use ($imageId) { |
|
| 279 | 279 | $containsId = !!strpos($mediaObject->{'@id'}, $imageId); |
| 280 | 280 | return !$containsId; |
| 281 | 281 | }; |
@@ -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(); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 50 | 50 | 'CultuurNet\UDB3\UsedKeywordsMemory\Created', |
| 51 | - function (array $serializedObject) { |
|
| 51 | + function(array $serializedObject) { |
|
| 52 | 52 | $serializedObject['class'] = UsedLabelsMemoryCreated::class; |
| 53 | 53 | |
| 54 | 54 | return $serializedObject; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 59 | 59 | 'CultuurNet\UDB3\UsedKeywordsMemory\KeywordUsed', |
| 60 | - function (array $serializedObject) { |
|
| 60 | + function(array $serializedObject) { |
|
| 61 | 61 | $serializedObject['class'] = LabelUsed::class; |
| 62 | 62 | |
| 63 | 63 | $serializedObject = self::manipulateLabel($serializedObject); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 74 | 74 | 'CultuurNet\UDB3\Event\TitleTranslated', |
| 75 | - function (array $serializedObject) { |
|
| 75 | + function(array $serializedObject) { |
|
| 76 | 76 | $serializedObject['class'] = TitleTranslated::class; |
| 77 | 77 | |
| 78 | 78 | $serializedObject = self::manipulateItemId($serializedObject); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 85 | 85 | 'CultuurNet\UDB3\Event\DescriptionTranslated', |
| 86 | - function (array $serializedObject) { |
|
| 86 | + function(array $serializedObject) { |
|
| 87 | 87 | $serializedObject['class'] = DescriptionTranslated::class; |
| 88 | 88 | |
| 89 | 89 | $serializedObject = self::manipulateItemId($serializedObject); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 100 | 100 | 'CultuurNet\UDB3\Event\Events\EventWasLabelled', |
| 101 | - function (array $serializedObject) { |
|
| 101 | + function(array $serializedObject) { |
|
| 102 | 102 | $serializedObject['class'] = LabelAdded::class; |
| 103 | 103 | |
| 104 | 104 | $serializedObject = self::manipulateItemId($serializedObject); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 111 | 111 | 'CultuurNet\UDB3\Event\EventWasTagged', |
| 112 | - function (array $serializedObject) { |
|
| 112 | + function(array $serializedObject) { |
|
| 113 | 113 | $serializedObject['class'] = LabelAdded::class; |
| 114 | 114 | |
| 115 | 115 | $serializedObject = self::manipulateItemId($serializedObject); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 124 | 124 | 'CultuurNet\UDB3\Event\TagErased', |
| 125 | - function (array $serializedObject) { |
|
| 125 | + function(array $serializedObject) { |
|
| 126 | 126 | $serializedObject['class'] = LabelDeleted::class; |
| 127 | 127 | |
| 128 | 128 | $serializedObject = self::manipulateItemId($serializedObject); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 137 | 137 | 'CultuurNet\UDB3\Event\Events\Unlabelled', |
| 138 | - function (array $serializedObject) { |
|
| 138 | + function(array $serializedObject) { |
|
| 139 | 139 | $serializedObject['class'] = LabelDeleted::class; |
| 140 | 140 | |
| 141 | 141 | $serializedObject = self::manipulateItemId($serializedObject); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 148 | 148 | 'CultuurNet\UDB3\Event\Events\LabelsApplied', |
| 149 | - function (array $serializedObject) { |
|
| 149 | + function(array $serializedObject) { |
|
| 150 | 150 | $serializedObject['class'] = LabelsMerged::class; |
| 151 | 151 | |
| 152 | 152 | $keywordsString = $serializedObject['payload']['keywords_string']; |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | $labels = array_map( |
| 171 | - function (Label $label) { |
|
| 171 | + function(Label $label) { |
|
| 172 | 172 | return [ |
| 173 | - 'text' => (string) $label, |
|
| 173 | + 'text' => (string)$label, |
|
| 174 | 174 | 'visible' => $label->isVisible(), |
| 175 | 175 | ]; |
| 176 | 176 | }, |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 192 | 192 | 'CultuurNet\UDB3\Event\EventImportedFromUDB2', |
| 193 | - function (array $serializedObject) { |
|
| 193 | + function(array $serializedObject) { |
|
| 194 | 194 | $serializedObject['class'] = EventImportedFromUDB2::class; |
| 195 | 195 | |
| 196 | 196 | return $serializedObject; |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 205 | 205 | 'CultuurNet\UDB3\Event\Events\BookingInfoUpdated', |
| 206 | - function (array $serializedObject) { |
|
| 206 | + function(array $serializedObject) { |
|
| 207 | 207 | |
| 208 | 208 | $serializedObject = self::manipulateItemId($serializedObject); |
| 209 | 209 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | |
| 218 | 218 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 219 | 219 | 'CultuurNet\UDB3\Event\Events\TypicalAgeRangeDeleted', |
| 220 | - function (array $serializedObject) { |
|
| 220 | + function(array $serializedObject) { |
|
| 221 | 221 | |
| 222 | 222 | $serializedObject = self::manipulateItemId($serializedObject); |
| 223 | 223 | |