@@ -38,7 +38,7 @@ |
||
38 | 38 | public function getNames() |
39 | 39 | { |
40 | 40 | return array_map( |
41 | - function (Label $label) { |
|
41 | + function(Label $label) { |
|
42 | 42 | return new StringLiteral($label->getName()->toString()); |
43 | 43 | }, |
44 | 44 | $this->getLabels()->toArray() |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | // Convert the imported labels to label collection. |
249 | 249 | $importLabelsCollection = new LabelCollection( |
250 | 250 | array_map( |
251 | - function (\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
251 | + function(\CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label $label) { |
|
252 | 252 | return new Label( |
253 | 253 | $label->getName()->toString(), |
254 | 254 | $label->isVisible() |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | foreach ($addedLabels->asArray() as $addedLabel) { |
273 | 273 | $importLabels = $importLabels->with( |
274 | 274 | new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label( |
275 | - new LabelName((string) $addedLabel), |
|
275 | + new LabelName((string)$addedLabel), |
|
276 | 276 | $addedLabel->isVisible() |
277 | 277 | ) |
278 | 278 | ); |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | protected function applyOrganizerImportedFromUDB2( |
339 | 339 | OrganizerImportedFromUDB2 $organizerImported |
340 | 340 | ) { |
341 | - $this->actorId = (string) $organizerImported->getActorId(); |
|
341 | + $this->actorId = (string)$organizerImported->getActorId(); |
|
342 | 342 | |
343 | 343 | // On import from UDB2 the default main language is 'nl'. |
344 | 344 | $this->mainLanguage = new Language('nl'); |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $normalizedData = [ |
50 | 50 | '@id' => $this->iriGenerator->iri($mediaObject->getMediaObjectId()), |
51 | 51 | '@type' => $type, |
52 | - 'contentUrl' => (string) $mediaObject->getSourceLocation(), |
|
53 | - 'thumbnailUrl' => (string) $mediaObject->getSourceLocation(), |
|
54 | - 'description' => (string) $mediaObject->getDescription(), |
|
55 | - 'copyrightHolder' => (string) $mediaObject->getCopyrightHolder(), |
|
56 | - 'inLanguage' => (string) $mediaObject->getLanguage(), |
|
52 | + 'contentUrl' => (string)$mediaObject->getSourceLocation(), |
|
53 | + 'thumbnailUrl' => (string)$mediaObject->getSourceLocation(), |
|
54 | + 'description' => (string)$mediaObject->getDescription(), |
|
55 | + 'copyrightHolder' => (string)$mediaObject->getCopyrightHolder(), |
|
56 | + 'inLanguage' => (string)$mediaObject->getLanguage(), |
|
57 | 57 | ]; |
58 | 58 | |
59 | 59 | return $normalizedData; |
@@ -61,18 +61,18 @@ discard block |
||
61 | 61 | |
62 | 62 | public function serializeMimeType(MIMEType $mimeType) |
63 | 63 | { |
64 | - $typeParts = explode('/', (string) $mimeType); |
|
64 | + $typeParts = explode('/', (string)$mimeType); |
|
65 | 65 | $type = array_shift($typeParts); |
66 | 66 | |
67 | 67 | if ($type === 'image') { |
68 | 68 | return 'schema:ImageObject'; |
69 | 69 | } |
70 | 70 | |
71 | - if ((string) $mimeType === 'application/octet-stream') { |
|
71 | + if ((string)$mimeType === 'application/octet-stream') { |
|
72 | 72 | return 'schema:mediaObject'; |
73 | 73 | } |
74 | 74 | |
75 | - throw new UnsupportedException('Unsupported MIME-type "'. $mimeType .'"'); |
|
75 | + throw new UnsupportedException('Unsupported MIME-type "'.$mimeType.'"'); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | public function deserialize($data, $type, $format, array $context = array()) |
@@ -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 | } |