@@ -66,9 +66,9 @@ |
||
66 | 66 | public function serialize() |
67 | 67 | { |
68 | 68 | return [ |
69 | - 'cdbid' => $this->cdbid, |
|
70 | - 'name' => $this->name->toNative(), |
|
71 | - 'address' => $this->address->serialize() |
|
69 | + 'cdbid' => $this->cdbid, |
|
70 | + 'name' => $this->name->toNative(), |
|
71 | + 'address' => $this->address->serialize() |
|
72 | 72 | ]; |
73 | 73 | } |
74 | 74 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | /** |
81 | 81 | * Factory method to create a new event. |
82 | 82 | * |
83 | - * @param $eventId |
|
83 | + * @param string $eventId |
|
84 | 84 | * @param Title $title |
85 | 85 | * @param EventType $eventType |
86 | 86 | * @param Location $location |
@@ -271,7 +271,7 @@ |
||
271 | 271 | */ |
272 | 272 | public function applyAudienceUpdated(AudienceUpdated $audienceUpdated) |
273 | 273 | { |
274 | - $this->audience= $audienceUpdated->getAudience(); |
|
274 | + $this->audience = $audienceUpdated->getAudience(); |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | /** |
@@ -20,6 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @param string $id |
22 | 22 | * @param string $description |
23 | + * @return string |
|
23 | 24 | */ |
24 | 25 | public function updateDescription($id, $description); |
25 | 26 | |
@@ -28,6 +29,7 @@ discard block |
||
28 | 29 | * |
29 | 30 | * @param string $id |
30 | 31 | * @param string $ageRange |
32 | + * @return string |
|
31 | 33 | */ |
32 | 34 | public function updateTypicalAgeRange($id, $ageRange); |
33 | 35 | |
@@ -35,6 +37,7 @@ discard block |
||
35 | 37 | * Delete the typical age range of a place. |
36 | 38 | * |
37 | 39 | * @param string $id |
40 | + * @return string |
|
38 | 41 | */ |
39 | 42 | public function deleteTypicalAgeRange($id); |
40 | 43 | |
@@ -43,6 +46,7 @@ discard block |
||
43 | 46 | * |
44 | 47 | * @param string $id |
45 | 48 | * @param string $organizerId |
49 | + * @return string |
|
46 | 50 | */ |
47 | 51 | public function updateOrganizer($id, $organizerId); |
48 | 52 | |
@@ -51,6 +55,7 @@ discard block |
||
51 | 55 | * |
52 | 56 | * @param string $id |
53 | 57 | * @param string $organizerId |
58 | + * @return string |
|
54 | 59 | */ |
55 | 60 | public function deleteOrganizer($id, $organizerId); |
56 | 61 | |
@@ -59,6 +64,7 @@ discard block |
||
59 | 64 | * |
60 | 65 | * @param string $id |
61 | 66 | * @param ContactPoint $contactPoint |
67 | + * @return string |
|
62 | 68 | */ |
63 | 69 | public function updateContactPoint($id, ContactPoint $contactPoint); |
64 | 70 | |
@@ -67,6 +73,7 @@ discard block |
||
67 | 73 | * |
68 | 74 | * @param string $id |
69 | 75 | * @param Image $image |
76 | + * @return string |
|
70 | 77 | */ |
71 | 78 | public function addImage($id, Image $image); |
72 | 79 | |
@@ -93,6 +100,7 @@ discard block |
||
93 | 100 | * |
94 | 101 | * @param string $id |
95 | 102 | * @param Image $image |
103 | + * @return string |
|
96 | 104 | */ |
97 | 105 | public function removeImage($id, Image $image); |
98 | 106 |
@@ -81,10 +81,10 @@ |
||
81 | 81 | public function serialize() |
82 | 82 | { |
83 | 83 | return [ |
84 | - 'streetAddress' => $this->streetAddress->toNative(), |
|
85 | - 'postalCode' => $this->postalCode->toNative(), |
|
86 | - 'addressLocality' => $this->locality->toNative(), |
|
87 | - 'addressCountry' => $this->countryCode, |
|
84 | + 'streetAddress' => $this->streetAddress->toNative(), |
|
85 | + 'postalCode' => $this->postalCode->toNative(), |
|
86 | + 'addressLocality' => $this->locality->toNative(), |
|
87 | + 'addressCountry' => $this->countryCode, |
|
88 | 88 | ]; |
89 | 89 | } |
90 | 90 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ); |
85 | 85 | |
86 | 86 | $calendar = [ |
87 | - 'type' => $this->type, |
|
87 | + 'type' => $this->type, |
|
88 | 88 | ]; |
89 | 89 | |
90 | 90 | empty($this->startDate) ?: $calendar['startDate'] = $this->startDate->format(DateTime::ATOM); |
@@ -167,9 +167,9 @@ discard block |
||
167 | 167 | $jsonLd['subEvent'] = array(); |
168 | 168 | foreach ($timestamps as $timestamp) { |
169 | 169 | $jsonLd['subEvent'][] = array( |
170 | - '@type' => 'Event', |
|
171 | - 'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM), |
|
172 | - 'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM), |
|
170 | + '@type' => 'Event', |
|
171 | + 'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM), |
|
172 | + 'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM), |
|
173 | 173 | ); |
174 | 174 | } |
175 | 175 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | array $openingHours = array() |
55 | 55 | ) { |
56 | 56 | if (($type->is(CalendarType::MULTIPLE()) || $type->is(CalendarType::SINGLE())) && empty($startDate)) { |
57 | - throw new \UnexpectedValueException('Start date can not be empty for calendar type: ' . $type . '.'); |
|
57 | + throw new \UnexpectedValueException('Start date can not be empty for calendar type: '.$type.'.'); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if ($type->is(CalendarType::PERIODIC()) && (empty($startDate) || empty($endDate))) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | public function serialize() |
83 | 83 | { |
84 | 84 | $serializedTimestamps = array_map( |
85 | - function (Timestamp $timestamp) { |
|
85 | + function(Timestamp $timestamp) { |
|
86 | 86 | return $timestamp->serialize(); |
87 | 87 | }, |
88 | 88 | $this->timestamps |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null, |
111 | 111 | !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null, |
112 | 112 | !empty($data['timestamps']) ? array_map( |
113 | - function ($timestamp) { |
|
113 | + function($timestamp) { |
|
114 | 114 | return Timestamp::deserialize($timestamp); |
115 | 115 | }, |
116 | 116 | $data['timestamps'] |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | // Permanent - with openingtimes |
211 | 211 | $openingHours = $this->getOpeningHours(); |
212 | 212 | if (!empty($openingHours)) { |
213 | - $jsonLd['openingHours'] = (array) $openingHours; |
|
213 | + $jsonLd['openingHours'] = (array)$openingHours; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $jsonLd; |
@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | $precision = 0; |
24 | - return new Price((int) round($value * 100, $precision)); |
|
24 | + return new Price((int)round($value * 100, $precision)); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -46,9 +46,9 @@ |
||
46 | 46 | StringLiteral $constraint, |
47 | 47 | StringLiteral $offerId |
48 | 48 | ) { |
49 | - $constraintStr = '(' . strtolower($constraint->toNative()) . ')'; |
|
49 | + $constraintStr = '('.strtolower($constraint->toNative()).')'; |
|
50 | 50 | $offerIdStr = $offerId->toNative(); |
51 | 51 | |
52 | - return '(' . $constraintStr . ' AND cdbid:' . $offerIdStr . ')'; |
|
52 | + return '('.$constraintStr.' AND cdbid:'.$offerIdStr.')'; |
|
53 | 53 | } |
54 | 54 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | if ($address) { |
64 | 64 | $address = new Address( |
65 | - new Street($address->getStreet() . ' ' . $address->getHouseNumber()), |
|
65 | + new Street($address->getStreet().' '.$address->getHouseNumber()), |
|
66 | 66 | new PostalCode($address->getZip()), |
67 | 67 | new Locality($address->getCity()), |
68 | 68 | Country::fromNative($address->getCountry()) |
@@ -29,6 +29,6 @@ |
||
29 | 29 | |
30 | 30 | /* @var OrganizerCreatedWithUniqueWebsite $payload */ |
31 | 31 | $payload = $domainMessage->getPayload(); |
32 | - return new StringLiteral((string) $payload->getWebsite()); |
|
32 | + return new StringLiteral((string)$payload->getWebsite()); |
|
33 | 33 | } |
34 | 34 | } |