@@ -10,7 +10,6 @@ |
||
10 | 10 | use CultuurNet\UDB3\Event\Events\EventCreated; |
11 | 11 | use CultuurNet\UDB3\Event\Events\EventImportedFromUDB2; |
12 | 12 | use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait; |
13 | -use CultuurNet\UDB3\Offer\Events\AbstractEvent; |
|
14 | 13 | use CultuurNet\UDB3\Offer\ReadModel\Permission\PermissionRepositoryInterface; |
15 | 14 | use ValueObjects\StringLiteral\StringLiteral; |
16 | 15 |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $jsonLD->address = $placeCreated->getAddress()->toJsonLd(); |
185 | 185 | |
186 | 186 | $calendarJsonLD = $placeCreated->getCalendar()->toJsonLd(); |
187 | - $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD); |
|
187 | + $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD); |
|
188 | 188 | |
189 | 189 | $availableTo = AvailableTo::createFromCalendar($placeCreated->getCalendar()); |
190 | 190 | $jsonLD->availableTo = (string)$availableTo; |
@@ -246,8 +246,8 @@ discard block |
||
246 | 246 | $jsonLD->availableTo = (string)$availableTo; |
247 | 247 | |
248 | 248 | // Remove old theme and event type. |
249 | - $jsonLD->terms = array_filter($jsonLD->terms, function ($term) { |
|
250 | - return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
249 | + $jsonLD->terms = array_filter($jsonLD->terms, function($term) { |
|
250 | + return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
251 | 251 | }); |
252 | 252 | |
253 | 253 | $eventType = $majorInfoUpdated->getEventType(); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | // Remove all old facilities + get numeric keys. |
280 | 280 | $terms = array_values(array_filter( |
281 | 281 | $terms, |
282 | - function ($term) { |
|
282 | + function($term) { |
|
283 | 283 | return $term->domain !== Facility::DOMAIN; |
284 | 284 | } |
285 | 285 | )); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | $placeLd = $document->getBody(); |
305 | 305 | |
306 | - $placeLd->geo = (object) [ |
|
306 | + $placeLd->geo = (object)[ |
|
307 | 307 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
308 | 308 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
309 | 309 | ]; |
@@ -28,12 +28,12 @@ |
||
28 | 28 | |
29 | 29 | if (count($missingFields) > 0) { |
30 | 30 | $keys = implode(', ', $missingFields); |
31 | - throw new \InvalidArgumentException('The given cdbxml address is missing a ' . $keys); |
|
31 | + throw new \InvalidArgumentException('The given cdbxml address is missing a '.$keys); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
35 | 35 | return new Address( |
36 | - new Street($cdbAddress->getStreet() . ' ' . $cdbAddress->getHouseNumber()), |
|
36 | + new Street($cdbAddress->getStreet().' '.$cdbAddress->getHouseNumber()), |
|
37 | 37 | new PostalCode($cdbAddress->getZip()), |
38 | 38 | new Locality($cdbAddress->getCity()), |
39 | 39 | Country::fromNative($cdbAddress->getCountry()) |
@@ -38,7 +38,7 @@ |
||
38 | 38 | public function serialize() |
39 | 39 | { |
40 | 40 | return parent::serialize() + [ |
41 | - 'website' => (string) $this->getWebsite() |
|
41 | + 'website' => (string)$this->getWebsite() |
|
42 | 42 | ]; |
43 | 43 | } |
44 | 44 |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $organizerCreated->getOrganizerId() |
135 | 135 | ); |
136 | 136 | |
137 | - $jsonLD->url = (string) $organizerCreated->getWebsite(); |
|
137 | + $jsonLD->url = (string)$organizerCreated->getWebsite(); |
|
138 | 138 | $jsonLD->name = $organizerCreated->getTitle(); |
139 | 139 | |
140 | 140 | $recordedOn = $domainMessage->getRecordedOn()->toString(); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $document = $this->repository->get($organizerId); |
162 | 162 | |
163 | 163 | $jsonLD = $document->getBody(); |
164 | - $jsonLD->url = (string) $websiteUpdated->getWebsite(); |
|
164 | + $jsonLD->url = (string)$websiteUpdated->getWebsite(); |
|
165 | 165 | |
166 | 166 | $this->repository->save($document->withBody($jsonLD)); |
167 | 167 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $labelsProperty = $labelAdded->getLabel()->isVisible() ? 'labels' : 'hiddenLabels'; |
258 | 258 | |
259 | 259 | $labels = isset($jsonLD->{$labelsProperty}) ? $jsonLD->{$labelsProperty} : []; |
260 | - $label = (string) $labelAdded->getLabel(); |
|
260 | + $label = (string)$labelAdded->getLabel(); |
|
261 | 261 | |
262 | 262 | $labels[] = $label; |
263 | 263 | $jsonLD->{$labelsProperty} = array_unique($labels); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | if (isset($jsonLD->{$labelsProperty}) && is_array($jsonLD->{$labelsProperty})) { |
282 | 282 | $jsonLD->{$labelsProperty} = array_filter( |
283 | 283 | $jsonLD->{$labelsProperty}, |
284 | - function ($label) use ($labelRemoved) { |
|
284 | + function($label) use ($labelRemoved) { |
|
285 | 285 | return !$labelRemoved->getLabel()->equals( |
286 | 286 | new Label($label) |
287 | 287 | ); |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | /* @var OrganizerCreatedWithUniqueWebsite|WebsiteUpdated $payload */ |
30 | 30 | $payload = $domainMessage->getPayload(); |
31 | - return new StringLiteral((string) $payload->getWebsite()); |
|
31 | + return new StringLiteral((string)$payload->getWebsite()); |
|
32 | 32 | } |
33 | 33 | } |
@@ -18,6 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @param string $id |
20 | 20 | * @param string $description |
21 | + * @return string |
|
21 | 22 | */ |
22 | 23 | public function updateDescription($id, $description); |
23 | 24 | |
@@ -26,6 +27,7 @@ discard block |
||
26 | 27 | * |
27 | 28 | * @param string $id |
28 | 29 | * @param AgeRange $ageRange |
30 | + * @return string |
|
29 | 31 | */ |
30 | 32 | public function updateTypicalAgeRange($id, AgeRange $ageRange); |
31 | 33 | |
@@ -33,6 +35,7 @@ discard block |
||
33 | 35 | * Delete the typical age range of a place. |
34 | 36 | * |
35 | 37 | * @param string $id |
38 | + * @return string |
|
36 | 39 | */ |
37 | 40 | public function deleteTypicalAgeRange($id); |
38 | 41 | |
@@ -41,6 +44,7 @@ discard block |
||
41 | 44 | * |
42 | 45 | * @param string $id |
43 | 46 | * @param string $organizerId |
47 | + * @return string |
|
44 | 48 | */ |
45 | 49 | public function updateOrganizer($id, $organizerId); |
46 | 50 | |
@@ -49,6 +53,7 @@ discard block |
||
49 | 53 | * |
50 | 54 | * @param string $id |
51 | 55 | * @param string $organizerId |
56 | + * @return string |
|
52 | 57 | */ |
53 | 58 | public function deleteOrganizer($id, $organizerId); |
54 | 59 | |
@@ -57,6 +62,7 @@ discard block |
||
57 | 62 | * |
58 | 63 | * @param string $id |
59 | 64 | * @param ContactPoint $contactPoint |
65 | + * @return string |
|
60 | 66 | */ |
61 | 67 | public function updateContactPoint($id, ContactPoint $contactPoint); |
62 | 68 | |
@@ -65,6 +71,7 @@ discard block |
||
65 | 71 | * |
66 | 72 | * @param string $id |
67 | 73 | * @param Image $image |
74 | + * @return string |
|
68 | 75 | */ |
69 | 76 | public function addImage($id, Image $image); |
70 | 77 | |
@@ -91,6 +98,7 @@ discard block |
||
91 | 98 | * |
92 | 99 | * @param string $id |
93 | 100 | * @param Image $image |
101 | + * @return string |
|
94 | 102 | */ |
95 | 103 | public function removeImage($id, Image $image); |
96 | 104 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function serialize() |
37 | 37 | { |
38 | 38 | return parent::serialize() + array( |
39 | - 'typicalAgeRange' => (string) $this->typicalAgeRange, |
|
39 | + 'typicalAgeRange' => (string)$this->typicalAgeRange, |
|
40 | 40 | ); |
41 | 41 | } |
42 | 42 |
@@ -63,10 +63,10 @@ |
||
63 | 63 | */ |
64 | 64 | public function __toString() |
65 | 65 | { |
66 | - $from = $this->from ? (string) $this->from : ''; |
|
67 | - $to = $this->to ? (string) $this->to : ''; |
|
66 | + $from = $this->from ? (string)$this->from : ''; |
|
67 | + $to = $this->to ? (string)$this->to : ''; |
|
68 | 68 | |
69 | - return $from . '-' . $to; |
|
69 | + return $from.'-'.$to; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |