@@ -73,8 +73,8 @@ |
||
73 | 73 | { |
74 | 74 | return parent::serialize() + array( |
75 | 75 | 'main_language' => $this->getMainLanguage()->getCode(), |
76 | - 'website' => (string) $this->getWebsite(), |
|
77 | - 'title' => (string) $this->getTitle(), |
|
76 | + 'website' => (string)$this->getWebsite(), |
|
77 | + 'title' => (string)$this->getTitle(), |
|
78 | 78 | ); |
79 | 79 | } |
80 | 80 |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | $this->setMainLanguage($jsonLD, $organizerCreated->getMainLanguage()); |
219 | 219 | |
220 | - $jsonLD->url = (string) $organizerCreated->getWebsite(); |
|
220 | + $jsonLD->url = (string)$organizerCreated->getWebsite(); |
|
221 | 221 | |
222 | 222 | $jsonLD->name = [ |
223 | 223 | $this->getMainLanguage($jsonLD)->getCode() => $organizerCreated->getTitle(), |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $document = $this->repository->get($organizerId); |
249 | 249 | |
250 | 250 | $jsonLD = $document->getBody(); |
251 | - $jsonLD->url = (string) $websiteUpdated->getWebsite(); |
|
251 | + $jsonLD->url = (string)$websiteUpdated->getWebsite(); |
|
252 | 252 | |
253 | 253 | return $document->withBody($jsonLD); |
254 | 254 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels'; |
357 | 357 | |
358 | 358 | $labels = isset($jsonLD->{$labelsProperty}) ? $jsonLD->{$labelsProperty} : []; |
359 | - $label = (string) $labelAdded->getLabel(); |
|
359 | + $label = (string)$labelAdded->getLabel(); |
|
360 | 360 | |
361 | 361 | $labels[] = $label; |
362 | 362 | $jsonLD->{$labelsProperty} = array_unique($labels); |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | if (isset($jsonLD->{$labelsProperty}) && is_array($jsonLD->{$labelsProperty})) { |
381 | 381 | $jsonLD->{$labelsProperty} = array_filter( |
382 | 382 | $jsonLD->{$labelsProperty}, |
383 | - function ($label) use ($labelRemoved) { |
|
383 | + function($label) use ($labelRemoved) { |
|
384 | 384 | return !$labelRemoved->getLabel()->equals( |
385 | 385 | new Label($label) |
386 | 386 | ); |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | private function applyOrganizerDeleted( |
408 | 408 | OrganizerDeleted $organizerDeleted |
409 | 409 | ) { |
410 | - $document = $this->repository->get($organizerDeleted->getOrganizerId()); |
|
410 | + $document = $this->repository->get($organizerDeleted->getOrganizerId()); |
|
411 | 411 | |
412 | 412 | $jsonLD = $document->getBody(); |
413 | 413 |
@@ -197,7 +197,7 @@ |
||
197 | 197 | /** |
198 | 198 | * @param $jsonLD |
199 | 199 | * @param DomainMessage $domainMessage |
200 | - * @return mixed |
|
200 | + * @return \stdClass |
|
201 | 201 | */ |
202 | 202 | private function appendCreator($jsonLD, $domainMessage) |
203 | 203 | { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | if (!is_string($itemId)) { |
21 | 21 | throw new \InvalidArgumentException( |
22 | - 'Expected itemId to be a string, received ' . gettype($itemId) |
|
22 | + 'Expected itemId to be a string, received '.gettype($itemId) |
|
23 | 23 | ); |
24 | 24 | } |
25 | 25 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $tableName |
28 | 28 | ) { |
29 | 29 | $this->connection = $connection; |
30 | - $this->tableName = (string) $tableName; |
|
30 | + $this->tableName = (string)$tableName; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ->select(UniqueDBALEventStoreDecorator::UUID_COLUMN) |
42 | 42 | ->from($this->tableName) |
43 | 43 | ->where($expr->eq(UniqueDBALEventStoreDecorator::UNIQUE_COLUMN, ':url')) |
44 | - ->setParameter(':url', (string) $url) |
|
44 | + ->setParameter(':url', (string)$url) |
|
45 | 45 | ->execute(); |
46 | 46 | |
47 | 47 | $uuid = $results->fetchColumn(); |
@@ -25,11 +25,11 @@ |
||
25 | 25 | */ |
26 | 26 | public function byId(StringLiteral $facilityId) |
27 | 27 | { |
28 | - if (!array_key_exists((string) $facilityId, $this->facilities)) { |
|
28 | + if (!array_key_exists((string)$facilityId, $this->facilities)) { |
|
29 | 29 | throw new \Exception("Unknown facility id '{$facilityId}'"); |
30 | 30 | } |
31 | 31 | |
32 | - return $this->facilities[(string) $facilityId]; |
|
32 | + return $this->facilities[(string)$facilityId]; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -49,7 +49,7 @@ |
||
49 | 49 | public function getNames() |
50 | 50 | { |
51 | 51 | return [ |
52 | - new StringLiteral((string) $this->label), |
|
52 | + new StringLiteral((string)$this->label), |
|
53 | 53 | ]; |
54 | 54 | } |
55 | 55 |
@@ -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'); |