@@ -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 |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | $this->connection->insert( |
77 | 77 | $this->rolePermissionTableName, |
78 | 78 | array( |
79 | - SchemaConfigurator::ROLE_ID_COLUMN => (string) $roleId, |
|
80 | - SchemaConfigurator::PERMISSION_COLUMN => (string) $permission, |
|
79 | + SchemaConfigurator::ROLE_ID_COLUMN => (string)$roleId, |
|
80 | + SchemaConfigurator::PERMISSION_COLUMN => (string)$permission, |
|
81 | 81 | ) |
82 | 82 | ); |
83 | 83 | } |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | $this->connection->delete( |
91 | 91 | $this->rolePermissionTableName, |
92 | 92 | array( |
93 | - SchemaConfigurator::ROLE_ID_COLUMN => (string) $roleId, |
|
94 | - SchemaConfigurator::PERMISSION_COLUMN => (string) $permission, |
|
93 | + SchemaConfigurator::ROLE_ID_COLUMN => (string)$roleId, |
|
94 | + SchemaConfigurator::PERMISSION_COLUMN => (string)$permission, |
|
95 | 95 | ) |
96 | 96 | ); |
97 | 97 | } |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | $this->connection->insert( |
105 | 105 | $this->userRoleTableName, |
106 | 106 | array( |
107 | - SchemaConfigurator::ROLE_ID_COLUMN => (string) $roleId, |
|
108 | - SchemaConfigurator::USER_ID_COLUMN => (string) $userId, |
|
107 | + SchemaConfigurator::ROLE_ID_COLUMN => (string)$roleId, |
|
108 | + SchemaConfigurator::USER_ID_COLUMN => (string)$userId, |
|
109 | 109 | ) |
110 | 110 | ); |
111 | 111 | } |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | $this->connection->delete( |
119 | 119 | $this->userRoleTableName, |
120 | 120 | array( |
121 | - SchemaConfigurator::USER_ID_COLUMN => (string) $userId, |
|
122 | - SchemaConfigurator::ROLE_ID_COLUMN => (string) $roleId, |
|
121 | + SchemaConfigurator::USER_ID_COLUMN => (string)$userId, |
|
122 | + SchemaConfigurator::ROLE_ID_COLUMN => (string)$roleId, |
|
123 | 123 | ) |
124 | 124 | ); |
125 | 125 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | if ($language->getCode() !== $this->mainLanguage->getCode()) { |
162 | 162 | $event = $this->createDescriptionTranslatedEvent($language, $description); |
163 | 163 | } else { |
164 | - $event = $this->createDescriptionUpdatedEvent((string) $description); |
|
164 | + $event = $this->createDescriptionUpdatedEvent((string)$description); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | $this->apply($event); |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | if ($this->rejectedReason && $reason->sameValueAs($this->rejectedReason)) { |
450 | 450 | return true; // nothing left to do if the offer has already been rejected for the same reason |
451 | 451 | } else { |
452 | - throw new Exception('The offer has already been rejected for another reason: ' . $this->rejectedReason); |
|
452 | + throw new Exception('The offer has already been rejected for another reason: '.$this->rejectedReason); |
|
453 | 453 | } |
454 | 454 | } |
455 | 455 | |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | $dutchImagesList = $imagesEvent->getImages()->toArray(); |
594 | 594 | $translatedImagesList = array_filter( |
595 | 595 | $this->images->toArray(), |
596 | - function (Image $image) { |
|
596 | + function(Image $image) { |
|
597 | 597 | return $image->getLanguage()->getCode() !== 'nl'; |
598 | 598 | } |
599 | 599 | ); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function toCdbCalendar(CalendarInterface $calendar) |
27 | 27 | { |
28 | 28 | $weekScheme = $this->getWeekScheme($calendar); |
29 | - $calendarType = (string) $calendar->getType(); |
|
29 | + $calendarType = (string)$calendar->getType(); |
|
30 | 30 | |
31 | 31 | switch ($calendarType) { |
32 | 32 | case CalendarType::MULTIPLE: |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps) |
86 | 86 | { |
87 | - $numberOfTimestamps = iterator_count($timestamps); |
|
87 | + $numberOfTimestamps = iterator_count($timestamps); |
|
88 | 88 | $timestamps->rewind(); |
89 | 89 | |
90 | 90 | return $numberOfTimestamps; |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | foreach ($openingHours as $openingHour) { |
119 | 119 | // In CDB2 every day needs to be a seperate entry. |
120 | 120 | if (is_array($openingHour)) { |
121 | - $openingHour = (object) $openingHour; |
|
121 | + $openingHour = (object)$openingHour; |
|
122 | 122 | } |
123 | 123 | foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) { |
124 | 124 | $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime( |
125 | - $openingHour->getOpens()->toNativeString() . ':00', |
|
126 | - $openingHour->getCloses()->toNativeString() . ':00' |
|
125 | + $openingHour->getOpens()->toNativeString().':00', |
|
126 | + $openingHour->getCloses()->toNativeString().':00' |
|
127 | 127 | ); |
128 | 128 | } |
129 | 129 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | } else { |
207 | 207 | $days = iterator_to_array($period->getDatePeriod('1 DAY')); |
208 | 208 | $fillerTimestamps = array_map( |
209 | - function (DateTimeInterface $dateTime) use ($index) { |
|
209 | + function(DateTimeInterface $dateTime) use ($index) { |
|
210 | 210 | return new CultureFeed_Cdb_Data_Calendar_Timestamp( |
211 | 211 | $dateTime->format('Y-m-d'), |
212 | 212 | $this->createIndexedTimeString($index) |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | $newCalendar = array_reduce( |
220 | 220 | array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]), |
221 | - function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
221 | + function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
222 | 222 | $calendar->add($timestamp); |
223 | 223 | return $calendar; |
224 | 224 | }, |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | $time = is_int($index) |
244 | - ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
244 | + ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
245 | 245 | : $timestamp->format('H:i:s'); |
246 | 246 | |
247 | 247 | return $time; |
@@ -253,6 +253,6 @@ discard block |
||
253 | 253 | */ |
254 | 254 | private function createIndexedTimeString($index) |
255 | 255 | { |
256 | - return '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT); |
|
256 | + return '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT); |
|
257 | 257 | } |
258 | 258 | } |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | |
560 | 560 | $jsonLD->name->nl = $majorInfoUpdated->getTitle(); |
561 | 561 | $jsonLD->location = array( |
562 | - '@type' => 'Place', |
|
562 | + '@type' => 'Place', |
|
563 | 563 | ) + (array)$this->placeJSONLD($majorInfoUpdated->getLocation()->getCdbid()); |
564 | 564 | |
565 | 565 | $availableTo = AvailableTo::createFromCalendar($majorInfoUpdated->getCalendar()); |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | |
596 | 596 | $jsonLD->location = [ |
597 | 597 | '@type' => 'Place', |
598 | - ] + (array) $this->placeJSONLD($locationUpdated->getLocationId()->toNative()); |
|
598 | + ] + (array) $this->placeJSONLD($locationUpdated->getLocationId()->toNative()); |
|
599 | 599 | |
600 | 600 | return $document->withBody($jsonLD); |
601 | 601 | } |
@@ -512,8 +512,8 @@ discard block |
||
512 | 512 | $eventJsonLD->{'@id'} = $this->iriGenerator->iri($eventCopied->getItemId()); |
513 | 513 | |
514 | 514 | // Set the new calendar. |
515 | - $eventJsonLD = (object) array_merge( |
|
516 | - (array) $eventJsonLD, |
|
515 | + $eventJsonLD = (object)array_merge( |
|
516 | + (array)$eventJsonLD, |
|
517 | 517 | $eventCopied->getCalendar()->toJsonLd() |
518 | 518 | ); |
519 | 519 | |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | |
527 | 527 | // Set available to and from. |
528 | 528 | $availableTo = AvailableTo::createFromCalendar($eventCopied->getCalendar()); |
529 | - $eventJsonLD->availableTo = (string) $availableTo; |
|
529 | + $eventJsonLD->availableTo = (string)$availableTo; |
|
530 | 530 | unset($eventJsonLD->availableFrom); |
531 | 531 | |
532 | 532 | $newDocument = new JsonDocument($eventCopied->getItemId()); |
@@ -566,8 +566,8 @@ discard block |
||
566 | 566 | $jsonLD->availableTo = (string)$availableTo; |
567 | 567 | |
568 | 568 | // Remove old theme and event type. |
569 | - $jsonLD->terms = array_filter($jsonLD->terms, function ($term) { |
|
570 | - return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
569 | + $jsonLD->terms = array_filter($jsonLD->terms, function($term) { |
|
570 | + return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN; |
|
571 | 571 | }); |
572 | 572 | $jsonLD->terms = array_values($jsonLD->terms); |
573 | 573 | |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | |
596 | 596 | $jsonLD->location = [ |
597 | 597 | '@type' => 'Place', |
598 | - ] + (array) $this->placeJSONLD($locationUpdated->getLocationId()->toNative()); |
|
598 | + ] + (array)$this->placeJSONLD($locationUpdated->getLocationId()->toNative()); |
|
599 | 599 | |
600 | 600 | return $document->withBody($jsonLD); |
601 | 601 | } |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | { |
647 | 647 | $eventSlug = $this->slugger->slug($name); |
648 | 648 | return array( |
649 | - 'http://www.uitinvlaanderen.be/agenda/e/' . $eventSlug . '/' . $eventId, |
|
649 | + 'http://www.uitinvlaanderen.be/agenda/e/'.$eventSlug.'/'.$eventId, |
|
650 | 650 | ); |
651 | 651 | } |
652 | 652 |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | |
541 | 541 | /** |
542 | 542 | * @param EventDeleted $eventDeleted |
543 | - * @return null |
|
543 | + * @return JsonDocument |
|
544 | 544 | */ |
545 | 545 | protected function applyEventDeleted(EventDeleted $eventDeleted) |
546 | 546 | { |
@@ -651,6 +651,9 @@ discard block |
||
651 | 651 | } |
652 | 652 | } |
653 | 653 | |
654 | + /** |
|
655 | + * @param string $eventId |
|
656 | + */ |
|
654 | 657 | private function generateSameAs($eventId, $name) |
655 | 658 | { |
656 | 659 | $eventSlug = $this->slugger->slug($name); |
@@ -22,6 +22,7 @@ discard block |
||
22 | 22 | * @param string $id |
23 | 23 | * @param Language $language |
24 | 24 | * @param StringLiteral $title |
25 | + * @return string |
|
25 | 26 | */ |
26 | 27 | public function updateTitle($id, Language $language, StringLiteral $title); |
27 | 28 | |
@@ -31,6 +32,7 @@ discard block |
||
31 | 32 | * @param string $id |
32 | 33 | * @param Language $language |
33 | 34 | * @param Description $description |
35 | + * @return string |
|
34 | 36 | */ |
35 | 37 | public function updateDescription($id, Language $language, Description $description); |
36 | 38 | |
@@ -39,6 +41,7 @@ discard block |
||
39 | 41 | * |
40 | 42 | * @param string $id |
41 | 43 | * @param AgeRange $ageRange |
44 | + * @return string |
|
42 | 45 | */ |
43 | 46 | public function updateTypicalAgeRange($id, AgeRange $ageRange); |
44 | 47 | |
@@ -46,6 +49,7 @@ discard block |
||
46 | 49 | * Delete the typical age range of a place. |
47 | 50 | * |
48 | 51 | * @param string $id |
52 | + * @return string |
|
49 | 53 | */ |
50 | 54 | public function deleteTypicalAgeRange($id); |
51 | 55 | |
@@ -54,6 +58,7 @@ discard block |
||
54 | 58 | * |
55 | 59 | * @param string $id |
56 | 60 | * @param string $organizerId |
61 | + * @return string |
|
57 | 62 | */ |
58 | 63 | public function updateOrganizer($id, $organizerId); |
59 | 64 | |
@@ -62,6 +67,7 @@ discard block |
||
62 | 67 | * |
63 | 68 | * @param string $id |
64 | 69 | * @param string $organizerId |
70 | + * @return string |
|
65 | 71 | */ |
66 | 72 | public function deleteOrganizer($id, $organizerId); |
67 | 73 | |
@@ -70,6 +76,7 @@ discard block |
||
70 | 76 | * |
71 | 77 | * @param string $id |
72 | 78 | * @param ContactPoint $contactPoint |
79 | + * @return string |
|
73 | 80 | */ |
74 | 81 | public function updateContactPoint($id, ContactPoint $contactPoint); |
75 | 82 | |
@@ -78,6 +85,7 @@ discard block |
||
78 | 85 | * |
79 | 86 | * @param string $id |
80 | 87 | * @param Image $image |
88 | + * @return string |
|
81 | 89 | */ |
82 | 90 | public function addImage($id, Image $image); |
83 | 91 | |
@@ -104,6 +112,7 @@ discard block |
||
104 | 112 | * |
105 | 113 | * @param string $id |
106 | 114 | * @param Image $image |
115 | + * @return string |
|
107 | 116 | */ |
108 | 117 | public function removeImage($id, Image $image); |
109 | 118 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | - * @return StringLiteral |
|
27 | + * @return string |
|
28 | 28 | */ |
29 | 29 | public function getTitle() |
30 | 30 | { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function serialize() |
37 | 37 | { |
38 | 38 | return parent::serialize() + array( |
39 | - 'title' => (string) $this->title, |
|
39 | + 'title' => (string)$this->title, |
|
40 | 40 | ); |
41 | 41 | } |
42 | 42 |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | |
44 | 44 | public function search($query, $limit = 30, $start = 0, $sort = null) |
45 | 45 | { |
46 | - $queryParameters = 'q=' . urlencode($query) . '&start=' . $start . '&limit=' . $limit; |
|
46 | + $queryParameters = 'q='.urlencode($query).'&start='.$start.'&limit='.$limit; |
|
47 | 47 | |
48 | 48 | $offerQuery = $this->searchLocation->withQuery($queryParameters); |
49 | 49 | |
50 | 50 | $offerRequest = new Request( |
51 | 51 | 'GET', |
52 | - (string) $offerQuery |
|
52 | + (string)$offerQuery |
|
53 | 53 | ); |
54 | 54 | |
55 | 55 | $searchResponseData = json_decode($this->httpClient |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | $offerIds = array_reduce( |
61 | 61 | $searchResponseData->{'member'}, |
62 | - function (OfferIdentifierCollection $offerIds, $item) { |
|
62 | + function(OfferIdentifierCollection $offerIds, $item) { |
|
63 | 63 | return $offerIds->with( |
64 | 64 | $this->offerIdentifier->fromIri(Url::fromNative($item->{'@id'})) |
65 | 65 | ); |