@@ -11,7 +11,7 @@ |
||
11 | 11 | public function filter($string) |
12 | 12 | { |
13 | 13 | if (!is_string($string)) { |
14 | - throw new \InvalidArgumentException('Argument should be string, got ' . gettype($string) . ' instead.'); |
|
14 | + throw new \InvalidArgumentException('Argument should be string, got '.gettype($string).' instead.'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | return preg_replace("/[\\r\\n]+/", " ", $string); |
@@ -12,6 +12,6 @@ |
||
12 | 12 | */ |
13 | 13 | public function path(UUID $fileId, StringLiteral $extension) |
14 | 14 | { |
15 | - return (string)$fileId . '.' . (string)$extension; |
|
15 | + return (string)$fileId.'.'.(string)$extension; |
|
16 | 16 | } |
17 | 17 | } |
@@ -129,7 +129,7 @@ |
||
129 | 129 | |
130 | 130 | // Get all physical locations from the list of addresses. |
131 | 131 | $addresses = array_map( |
132 | - function (CultureFeed_Cdb_Data_Address $address) { |
|
132 | + function(CultureFeed_Cdb_Data_Address $address) { |
|
133 | 133 | return $address->getPhysicalAddress(); |
134 | 134 | }, |
135 | 135 | $contactInfo->getAddresses() |
@@ -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 | } |