@@ -116,10 +116,10 @@ |
||
| 116 | 116 | { |
| 117 | 117 | $serialized = array_filter( |
| 118 | 118 | [ |
| 119 | - 'phone' => $this->phone, |
|
| 120 | - 'email' => $this->email, |
|
| 121 | - 'url' => $this->url, |
|
| 122 | - 'urlLabel' => $this->urlLabel, |
|
| 119 | + 'phone' => $this->phone, |
|
| 120 | + 'email' => $this->email, |
|
| 121 | + 'url' => $this->url, |
|
| 122 | + 'urlLabel' => $this->urlLabel, |
|
| 123 | 123 | ] |
| 124 | 124 | ); |
| 125 | 125 | |
@@ -65,21 +65,21 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 67 | 67 | 'CultuurNet\UDB3\Event\Events\EventCreated', |
| 68 | - function (array $serializedObject) { |
|
| 68 | + function(array $serializedObject) { |
|
| 69 | 69 | return self::addDefaultMainLanguage($serializedObject); |
| 70 | 70 | } |
| 71 | 71 | ); |
| 72 | 72 | |
| 73 | 73 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 74 | 74 | 'CultuurNet\UDB3\Place\Events\PlaceCreated', |
| 75 | - function (array $serializedObject) { |
|
| 75 | + function(array $serializedObject) { |
|
| 76 | 76 | return self::addDefaultMainLanguage($serializedObject); |
| 77 | 77 | } |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | 80 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 81 | 81 | 'CultuurNet\UDB3\Organizer\Events\OrganizerCreatedWithUniqueWebsite', |
| 82 | - function (array $serializedObject) { |
|
| 82 | + function(array $serializedObject) { |
|
| 83 | 83 | return self::addDefaultMainLanguage($serializedObject); |
| 84 | 84 | } |
| 85 | 85 | ); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 92 | 92 | 'CultuurNet\UDB3\Event\TitleTranslated', |
| 93 | - function (array $serializedObject) { |
|
| 93 | + function(array $serializedObject) { |
|
| 94 | 94 | $serializedObject['class'] = TitleTranslated::class; |
| 95 | 95 | |
| 96 | 96 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 103 | 103 | 'CultuurNet\UDB3\Event\DescriptionTranslated', |
| 104 | - function (array $serializedObject) { |
|
| 104 | + function(array $serializedObject) { |
|
| 105 | 105 | $serializedObject['class'] = DescriptionTranslated::class; |
| 106 | 106 | |
| 107 | 107 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -116,49 +116,49 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 118 | 118 | 'CultuurNet\UDB3\Label\Events\MadeInvisible', |
| 119 | - function (array $serializedObject) use ($labelRepository) { |
|
| 119 | + function(array $serializedObject) use ($labelRepository) { |
|
| 120 | 120 | return self::addLabelName($serializedObject, $labelRepository); |
| 121 | 121 | } |
| 122 | 122 | ); |
| 123 | 123 | |
| 124 | 124 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 125 | 125 | 'CultuurNet\UDB3\Label\Events\MadeVisible', |
| 126 | - function (array $serializedObject) use ($labelRepository) { |
|
| 126 | + function(array $serializedObject) use ($labelRepository) { |
|
| 127 | 127 | return self::addLabelName($serializedObject, $labelRepository); |
| 128 | 128 | } |
| 129 | 129 | ); |
| 130 | 130 | |
| 131 | 131 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 132 | 132 | 'CultuurNet\UDB3\Label\Events\MadePrivate', |
| 133 | - function (array $serializedObject) use ($labelRepository) { |
|
| 133 | + function(array $serializedObject) use ($labelRepository) { |
|
| 134 | 134 | return self::addLabelName($serializedObject, $labelRepository); |
| 135 | 135 | } |
| 136 | 136 | ); |
| 137 | 137 | |
| 138 | 138 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 139 | 139 | 'CultuurNet\UDB3\Label\Events\MadePublic', |
| 140 | - function (array $serializedObject) use ($labelRepository) { |
|
| 140 | + function(array $serializedObject) use ($labelRepository) { |
|
| 141 | 141 | return self::addLabelName($serializedObject, $labelRepository); |
| 142 | 142 | } |
| 143 | 143 | ); |
| 144 | 144 | |
| 145 | 145 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 146 | 146 | 'CultuurNet\UDB3\Organizer\Events\LabelAdded', |
| 147 | - function (array $serializedObject) use ($labelRepository) { |
|
| 147 | + function(array $serializedObject) use ($labelRepository) { |
|
| 148 | 148 | return self::fixOrganizerLabelEvent($serializedObject, $labelRepository); |
| 149 | 149 | } |
| 150 | 150 | ); |
| 151 | 151 | |
| 152 | 152 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 153 | 153 | 'CultuurNet\UDB3\Organizer\Events\LabelRemoved', |
| 154 | - function (array $serializedObject) use ($labelRepository) { |
|
| 154 | + function(array $serializedObject) use ($labelRepository) { |
|
| 155 | 155 | return self::fixOrganizerLabelEvent($serializedObject, $labelRepository); |
| 156 | 156 | } |
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | 159 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 160 | 160 | 'CultuurNet\UDB3\Event\Events\EventWasLabelled', |
| 161 | - function (array $serializedObject) { |
|
| 161 | + function(array $serializedObject) { |
|
| 162 | 162 | $serializedObject['class'] = LabelAdded::class; |
| 163 | 163 | |
| 164 | 164 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 171 | 171 | 'CultuurNet\UDB3\Event\EventWasTagged', |
| 172 | - function (array $serializedObject) { |
|
| 172 | + function(array $serializedObject) { |
|
| 173 | 173 | $serializedObject['class'] = LabelAdded::class; |
| 174 | 174 | |
| 175 | 175 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 184 | 184 | 'CultuurNet\UDB3\Event\TagErased', |
| 185 | - function (array $serializedObject) { |
|
| 185 | + function(array $serializedObject) { |
|
| 186 | 186 | $serializedObject['class'] = LabelRemoved::class; |
| 187 | 187 | |
| 188 | 188 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 197 | 197 | 'CultuurNet\UDB3\Event\Events\Unlabelled', |
| 198 | - function (array $serializedObject) { |
|
| 198 | + function(array $serializedObject) { |
|
| 199 | 199 | $serializedObject['class'] = LabelRemoved::class; |
| 200 | 200 | |
| 201 | 201 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 212 | 212 | 'CultuurNet\UDB3\Event\EventImportedFromUDB2', |
| 213 | - function (array $serializedObject) { |
|
| 213 | + function(array $serializedObject) { |
|
| 214 | 214 | $serializedObject['class'] = EventImportedFromUDB2::class; |
| 215 | 215 | |
| 216 | 216 | return $serializedObject; |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 224 | 224 | 'CultuurNet\UDB3\Place\Events\FacilitiesUpdated', |
| 225 | - function (array $serializedObject) { |
|
| 225 | + function(array $serializedObject) { |
|
| 226 | 226 | $serializedObject = self::replacePlaceIdWithItemId($serializedObject); |
| 227 | 227 | |
| 228 | 228 | return $serializedObject; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 236 | 236 | 'CultuurNet\UDB3\Place\Events\GeoCoordinatesUpdated', |
| 237 | - function (array $serializedObject) { |
|
| 237 | + function(array $serializedObject) { |
|
| 238 | 238 | $serializedObject = self::replacePlaceIdWithItemId($serializedObject); |
| 239 | 239 | |
| 240 | 240 | return $serializedObject; |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | /** |
| 245 | 245 | * BOOKING INFO EVENT |
| 246 | 246 | */ |
| 247 | - $manipulateAvailability = function (array $serializedBookingInfo, $propertyName) { |
|
| 247 | + $manipulateAvailability = function(array $serializedBookingInfo, $propertyName) { |
|
| 248 | 248 | if (!isset($serializedBookingInfo[$propertyName]) || empty($serializedBookingInfo[$propertyName])) { |
| 249 | 249 | $serializedBookingInfo[$propertyName] = null; |
| 250 | 250 | return $serializedBookingInfo; |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | return $serializedBookingInfo; |
| 275 | 275 | }; |
| 276 | 276 | |
| 277 | - $manipulateBookingInfoEvent = function (array $serializedEvent) use ($manipulateAvailability) { |
|
| 277 | + $manipulateBookingInfoEvent = function(array $serializedEvent) use ($manipulateAvailability) { |
|
| 278 | 278 | $serializedEvent = self::replaceEventIdWithItemId($serializedEvent); |
| 279 | 279 | $serializedEvent = self::replacePlaceIdWithItemId($serializedEvent); |
| 280 | 280 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | foreach ($refactoredEventEvents as $refactoredEventEvent) { |
| 314 | 314 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 315 | 315 | $refactoredEventEvent, |
| 316 | - function (array $serializedObject) { |
|
| 316 | + function(array $serializedObject) { |
|
| 317 | 317 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
| 318 | 318 | return $serializedObject; |
| 319 | 319 | } |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | foreach ($refactoredPlaceEvents as $refactoredPlaceEvent) { |
| 337 | 337 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 338 | 338 | $refactoredPlaceEvent, |
| 339 | - function (array $serializedObject) { |
|
| 339 | + function(array $serializedObject) { |
|
| 340 | 340 | $serializedObject = self::replacePlaceIdWithItemId($serializedObject); |
| 341 | 341 | return $serializedObject; |
| 342 | 342 | } |
@@ -354,11 +354,11 @@ discard block |
||
| 354 | 354 | foreach ($priceInfoEvents as $priceInfoEvent) { |
| 355 | 355 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
| 356 | 356 | $priceInfoEvent, |
| 357 | - function (array $serializedObject) { |
|
| 357 | + function(array $serializedObject) { |
|
| 358 | 358 | $payload = &$serializedObject['payload']; |
| 359 | 359 | $priceInfo = &$payload['price_info']; |
| 360 | 360 | $tariffs = array_map( |
| 361 | - function (array $tariff) { |
|
| 361 | + function(array $tariff) { |
|
| 362 | 362 | $name = $tariff['name']; |
| 363 | 363 | if (is_string($name)) { |
| 364 | 364 | $name = ['nl' => $name]; |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $document = $this->documentRepository->get($cdbid); |
| 39 | 39 | |
| 40 | 40 | if (!$document) { |
| 41 | - throw new EntityNotFoundException('Could not load JSON-LD document for cdbid ' . $cdbid); |
|
| 41 | + throw new EntityNotFoundException('Could not load JSON-LD document for cdbid '.$cdbid); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $json = $document->getBody(); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | 'addressCountry' => $address->getCountry(), |
| 193 | 193 | 'addressLocality' => $address->getCity(), |
| 194 | 194 | 'postalCode' => $address->getZip(), |
| 195 | - 'streetAddress' => $address->getStreet() . ' ' . $address->getHouseNumber(), |
|
| 195 | + 'streetAddress' => $address->getStreet().' '.$address->getHouseNumber(), |
|
| 196 | 196 | ); |
| 197 | 197 | } |
| 198 | 198 | } |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $slug = ''; |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId(); |
|
| 354 | + $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId(); |
|
| 355 | 355 | |
| 356 | 356 | |
| 357 | 357 | if (!property_exists($jsonLD, 'sameAs')) { |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | */ |
| 370 | 370 | private function importAudience(\CultureFeed_Cdb_Item_Event $event, \stdClass $jsonLD) |
| 371 | 371 | { |
| 372 | - $eventIsPrivate = (bool) $event->isPrivate(); |
|
| 372 | + $eventIsPrivate = (bool)$event->isPrivate(); |
|
| 373 | 373 | $eventTargetsEducation = $eventIsPrivate && $event->getCategories()->hasCategory('2.1.3.0.0'); |
| 374 | 374 | |
| 375 | 375 | $audienceType = $eventTargetsEducation ? 'education' : ($eventIsPrivate ? 'members' : 'everyone'); |
@@ -161,7 +161,7 @@ |
||
| 161 | 161 | |
| 162 | 162 | $mainLanguageDetails = array_filter( |
| 163 | 163 | $details, |
| 164 | - function (\CultureFeed_Cdb_Data_Detail $detail) use ($mainLanguage) { |
|
| 164 | + function(\CultureFeed_Cdb_Data_Detail $detail) use ($mainLanguage) { |
|
| 165 | 165 | return $detail->getLanguage() === $mainLanguage->getCode(); |
| 166 | 166 | } |
| 167 | 167 | ); |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | - * @param \CultureFeed_Cdb_Data_DetailList|\CultureFeed_Cdb_Data_Detail[] $details |
|
| 156 | + * @param \CultureFeed_Cdb_Data_DetailList $details |
|
| 157 | 157 | * @param \stdClass $jsonLD |
| 158 | 158 | */ |
| 159 | 159 | public function importPriceInfo( |
@@ -59,13 +59,13 @@ |
||
| 59 | 59 | $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl'; |
| 60 | 60 | |
| 61 | 61 | if (is_string($body->name)) { |
| 62 | - $body->name = (object) [ |
|
| 62 | + $body->name = (object)[ |
|
| 63 | 63 | $mainLanguage => $body->name, |
| 64 | 64 | ]; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if (isset($body->address->streetAddress)) { |
| 68 | - $body->address = (object) [ |
|
| 68 | + $body->address = (object)[ |
|
| 69 | 69 | $mainLanguage => $body->address, |
| 70 | 70 | ]; |
| 71 | 71 | } |
@@ -62,20 +62,20 @@ |
||
| 62 | 62 | $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl'; |
| 63 | 63 | |
| 64 | 64 | if (isset($body->address->streetAddress)) { |
| 65 | - $body->address = (object) [ |
|
| 65 | + $body->address = (object)[ |
|
| 66 | 66 | $mainLanguage => $body->address, |
| 67 | 67 | ]; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | if (isset($body->bookingInfo->urlLabel) && is_string($body->bookingInfo->urlLabel)) { |
| 71 | - $body->bookingInfo->urlLabel = (object) [ |
|
| 71 | + $body->bookingInfo->urlLabel = (object)[ |
|
| 72 | 72 | $mainLanguage => $body->bookingInfo->urlLabel, |
| 73 | 73 | ]; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | if (isset($body->priceInfo) && is_array($body->priceInfo) && is_string($body->priceInfo[0]->name)) { |
| 77 | 77 | foreach ($body->priceInfo as $priceInfo) { |
| 78 | - $priceInfo->name = (object) [ |
|
| 78 | + $priceInfo->name = (object)[ |
|
| 79 | 79 | $mainLanguage => $priceInfo->name, |
| 80 | 80 | ]; |
| 81 | 81 | } |
@@ -61,14 +61,14 @@ |
||
| 61 | 61 | $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl'; |
| 62 | 62 | |
| 63 | 63 | if (isset($body->bookingInfo->urlLabel) && is_string($body->bookingInfo->urlLabel)) { |
| 64 | - $body->bookingInfo->urlLabel = (object) [ |
|
| 64 | + $body->bookingInfo->urlLabel = (object)[ |
|
| 65 | 65 | $mainLanguage => $body->bookingInfo->urlLabel, |
| 66 | 66 | ]; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | if (isset($body->priceInfo) && is_array($body->priceInfo) && is_string($body->priceInfo[0]->name)) { |
| 70 | 70 | foreach ($body->priceInfo as $priceInfo) { |
| 71 | - $priceInfo->name = (object) [ |
|
| 71 | + $priceInfo->name = (object)[ |
|
| 72 | 72 | $mainLanguage => $priceInfo->name, |
| 73 | 73 | ]; |
| 74 | 74 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $sameFacilities = array_uintersect( |
| 217 | 217 | $facilities1, |
| 218 | 218 | $facilities2, |
| 219 | - function (Facility $facility1, Facility $facility2) { |
|
| 219 | + function(Facility $facility1, Facility $facility2) { |
|
| 220 | 220 | return strcmp($facility1->getId(), $facility2->getId()); |
| 221 | 221 | } |
| 222 | 222 | ); |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | // Convert the imported labels to label collection. |
| 268 | 268 | $importLabelsCollection = new LabelCollection( |
| 269 | 269 | array_map( |
| 270 | - function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
| 270 | + function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
| 271 | 271 | return new Label( |
| 272 | 272 | $label->getName()->toString(), |
| 273 | 273 | $label->isVisible() |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | foreach ($addedLabels->asArray() as $addedLabel) { |
| 292 | 292 | $importLabels = $importLabels->with( |
| 293 | 293 | new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label( |
| 294 | - new LabelName((string) $addedLabel), |
|
| 294 | + new LabelName((string)$addedLabel), |
|
| 295 | 295 | $addedLabel->isVisible() |
| 296 | 296 | ) |
| 297 | 297 | ); |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | $importImages = $imageCollection->toArray(); |
| 676 | 676 | $currentImages = $currentImageCollection->toArray(); |
| 677 | 677 | |
| 678 | - $compareImages = function (Image $a, Image $b) { |
|
| 678 | + $compareImages = function(Image $a, Image $b) { |
|
| 679 | 679 | $idA = $a->getMediaObjectId()->toNative(); |
| 680 | 680 | $idB = $b->getMediaObjectId()->toNative(); |
| 681 | 681 | return strcmp($idA, $idB); |
@@ -822,7 +822,7 @@ discard block |
||
| 822 | 822 | if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) { |
| 823 | 823 | return true; // nothing left to do if the offer has already been rejected for the same reason |
| 824 | 824 | } else { |
| 825 | - throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason); |
|
| 825 | + throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason); |
|
| 826 | 826 | } |
| 827 | 827 | } |
| 828 | 828 | |
@@ -997,7 +997,7 @@ discard block |
||
| 997 | 997 | $dutchImagesList = $imagesEvent->getImages()->toArray(); |
| 998 | 998 | $translatedImagesList = array_filter( |
| 999 | 999 | $this->images->toArray(), |
| 1000 | - function (Image $image) { |
|
| 1000 | + function(Image $image) { |
|
| 1001 | 1001 | return $image->getLanguage()->getCode() !== 'nl'; |
| 1002 | 1002 | } |
| 1003 | 1003 | ); |