@@ -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("/(\\n)+/", " ", $string); |
@@ -36,14 +36,14 @@ discard block |
||
36 | 36 | if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) { |
37 | 37 | /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */ |
38 | 38 | $period = $cdbCalendar->current(); |
39 | - $startDateString = $period->getDateFrom() . 'T00:00:00'; |
|
39 | + $startDateString = $period->getDateFrom().'T00:00:00'; |
|
40 | 40 | } else if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) { |
41 | 41 | /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */ |
42 | 42 | $timestamp = $cdbCalendar->current(); |
43 | 43 | if ($timestamp->getStartTime()) { |
44 | - $startDateString = $timestamp->getDate() . 'T' . $timestamp->getStartTime(); |
|
44 | + $startDateString = $timestamp->getDate().'T'.$timestamp->getStartTime(); |
|
45 | 45 | } else { |
46 | - $startDateString = $timestamp->getDate() . 'T00:00:00'; |
|
46 | + $startDateString = $timestamp->getDate().'T00:00:00'; |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | $startDate = !empty($startDateString) ? DateTimeFactory::dateTimeFromDateString($startDateString) : null; |
@@ -56,17 +56,17 @@ discard block |
||
56 | 56 | if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) { |
57 | 57 | /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */ |
58 | 58 | $period = $cdbCalendar->current(); |
59 | - $endDateString = $period->getDateTo() . 'T00:00:00'; |
|
59 | + $endDateString = $period->getDateTo().'T00:00:00'; |
|
60 | 60 | } else if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) { |
61 | 61 | $firstTimestamp = $cdbCalendar->current(); |
62 | 62 | /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */ |
63 | 63 | $cdbCalendarAsArray = iterator_to_array($cdbCalendar); |
64 | 64 | $timestamp = iterator_count($cdbCalendar) > 1 ? end($cdbCalendarAsArray) : $firstTimestamp; |
65 | 65 | if ($timestamp->getEndTime()) { |
66 | - $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime(); |
|
66 | + $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime(); |
|
67 | 67 | } else { |
68 | 68 | $endTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00'; |
69 | - $endDateString = $timestamp->getDate() . 'T' . $endTime; |
|
69 | + $endDateString = $timestamp->getDate().'T'.$endTime; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | $endDate = !empty($endDateString) ? DateTimeFactory::dateTimeFromDateString($endDateString) : null; |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | $cdbCalendar->next(); |
84 | 84 | |
85 | 85 | if ($timestamp->getStartTime()) { |
86 | - $startDateString = $timestamp->getDate() . 'T' . $timestamp->getStartTime(); |
|
86 | + $startDateString = $timestamp->getDate().'T'.$timestamp->getStartTime(); |
|
87 | 87 | |
88 | 88 | if ($timestamp->getEndTime()) { |
89 | - $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime(); |
|
89 | + $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime(); |
|
90 | 90 | } else { |
91 | 91 | $endTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00'; |
92 | - $endDateString = $timestamp->getDate() . 'T' . $endTime; |
|
92 | + $endDateString = $timestamp->getDate().'T'.$endTime; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $openingHour = $mergedOpeningHour->getOpeningHours()[0]; |
205 | 205 | $openingHoursAsArray[] = [ |
206 | 206 | 'dayOfWeek' => array_map( |
207 | - function (WeekDay $weekDay) { |
|
207 | + function(WeekDay $weekDay) { |
|
208 | 208 | return strtolower($weekDay->toNative()); |
209 | 209 | }, |
210 | 210 | $mergedOpeningHour->getWeekDays() |
@@ -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("/(\\n)+/", " ", $string); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
68 | 68 | 'CultuurNet\UDB3\UsedKeywordsMemory\Created', |
69 | - function (array $serializedObject) { |
|
69 | + function(array $serializedObject) { |
|
70 | 70 | $serializedObject['class'] = UsedLabelsMemoryCreated::class; |
71 | 71 | |
72 | 72 | return $serializedObject; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
77 | 77 | 'CultuurNet\UDB3\UsedKeywordsMemory\KeywordUsed', |
78 | - function (array $serializedObject) { |
|
78 | + function(array $serializedObject) { |
|
79 | 79 | $serializedObject['class'] = LabelUsed::class; |
80 | 80 | |
81 | 81 | $serializedObject = self::replaceKeywordWithLabel($serializedObject); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
92 | 92 | 'CultuurNet\UDB3\Event\TitleTranslated', |
93 | - function (array $serializedObject) { |
|
93 | + function(array $serializedObject) { |
|
94 | 94 | $serializedObject['class'] = TitleTranslated::class; |
95 | 95 | |
96 | 96 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
103 | 103 | 'CultuurNet\UDB3\Event\DescriptionTranslated', |
104 | - function (array $serializedObject) { |
|
104 | + function(array $serializedObject) { |
|
105 | 105 | $serializedObject['class'] = DescriptionTranslated::class; |
106 | 106 | |
107 | 107 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -116,49 +116,49 @@ discard block |
||
116 | 116 | |
117 | 117 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
118 | 118 | 'CultuurNet\UDB3\Label\Events\MadeInvisible', |
119 | - function (array $serializedObject) use ($labelRepository) { |
|
119 | + function(array $serializedObject) use ($labelRepository) { |
|
120 | 120 | return self::addLabelName($serializedObject, $labelRepository); |
121 | 121 | } |
122 | 122 | ); |
123 | 123 | |
124 | 124 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
125 | 125 | 'CultuurNet\UDB3\Label\Events\MadeVisible', |
126 | - function (array $serializedObject) use ($labelRepository) { |
|
126 | + function(array $serializedObject) use ($labelRepository) { |
|
127 | 127 | return self::addLabelName($serializedObject, $labelRepository); |
128 | 128 | } |
129 | 129 | ); |
130 | 130 | |
131 | 131 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
132 | 132 | 'CultuurNet\UDB3\Label\Events\MadePrivate', |
133 | - function (array $serializedObject) use ($labelRepository) { |
|
133 | + function(array $serializedObject) use ($labelRepository) { |
|
134 | 134 | return self::addLabelName($serializedObject, $labelRepository); |
135 | 135 | } |
136 | 136 | ); |
137 | 137 | |
138 | 138 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
139 | 139 | 'CultuurNet\UDB3\Label\Events\MadePublic', |
140 | - function (array $serializedObject) use ($labelRepository) { |
|
140 | + function(array $serializedObject) use ($labelRepository) { |
|
141 | 141 | return self::addLabelName($serializedObject, $labelRepository); |
142 | 142 | } |
143 | 143 | ); |
144 | 144 | |
145 | 145 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
146 | 146 | 'CultuurNet\UDB3\Organizer\Events\LabelAdded', |
147 | - function (array $serializedObject) use ($labelRepository) { |
|
147 | + function(array $serializedObject) use ($labelRepository) { |
|
148 | 148 | return self::fixOrganizerLabelEvent($serializedObject, $labelRepository); |
149 | 149 | } |
150 | 150 | ); |
151 | 151 | |
152 | 152 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
153 | 153 | 'CultuurNet\UDB3\Organizer\Events\LabelRemoved', |
154 | - function (array $serializedObject) use ($labelRepository) { |
|
154 | + function(array $serializedObject) use ($labelRepository) { |
|
155 | 155 | return self::fixOrganizerLabelEvent($serializedObject, $labelRepository); |
156 | 156 | } |
157 | 157 | ); |
158 | 158 | |
159 | 159 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
160 | 160 | 'CultuurNet\UDB3\Event\Events\EventWasLabelled', |
161 | - function (array $serializedObject) { |
|
161 | + function(array $serializedObject) { |
|
162 | 162 | $serializedObject['class'] = LabelAdded::class; |
163 | 163 | |
164 | 164 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | |
170 | 170 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
171 | 171 | 'CultuurNet\UDB3\Event\EventWasTagged', |
172 | - function (array $serializedObject) { |
|
172 | + function(array $serializedObject) { |
|
173 | 173 | $serializedObject['class'] = LabelAdded::class; |
174 | 174 | |
175 | 175 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
184 | 184 | 'CultuurNet\UDB3\Event\TagErased', |
185 | - function (array $serializedObject) { |
|
185 | + function(array $serializedObject) { |
|
186 | 186 | $serializedObject['class'] = LabelRemoved::class; |
187 | 187 | |
188 | 188 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
197 | 197 | 'CultuurNet\UDB3\Event\Events\Unlabelled', |
198 | - function (array $serializedObject) { |
|
198 | + function(array $serializedObject) { |
|
199 | 199 | $serializedObject['class'] = LabelRemoved::class; |
200 | 200 | |
201 | 201 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | |
207 | 207 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
208 | 208 | 'CultuurNet\UDB3\Event\Events\LabelsApplied', |
209 | - function (array $serializedObject) { |
|
209 | + function(array $serializedObject) { |
|
210 | 210 | $serializedObject['class'] = LabelsMerged::class; |
211 | 211 | |
212 | 212 | $keywordsString = $serializedObject['payload']['keywords_string']; |
@@ -228,9 +228,9 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | $labels = array_map( |
231 | - function (Label $label) { |
|
231 | + function(Label $label) { |
|
232 | 232 | return [ |
233 | - 'text' => (string) $label, |
|
233 | + 'text' => (string)$label, |
|
234 | 234 | 'visible' => $label->isVisible(), |
235 | 235 | ]; |
236 | 236 | }, |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
252 | 252 | 'CultuurNet\UDB3\Event\EventImportedFromUDB2', |
253 | - function (array $serializedObject) { |
|
253 | + function(array $serializedObject) { |
|
254 | 254 | $serializedObject['class'] = EventImportedFromUDB2::class; |
255 | 255 | |
256 | 256 | return $serializedObject; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | foreach ($refactoredEventEvents as $refactoredEventEvent) { |
276 | 276 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
277 | 277 | $refactoredEventEvent, |
278 | - function (array $serializedObject) { |
|
278 | + function(array $serializedObject) { |
|
279 | 279 | $serializedObject = self::replaceEventIdWithItemId($serializedObject); |
280 | 280 | return $serializedObject; |
281 | 281 | } |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | foreach ($refactoredPlaceEvents as $refactoredPlaceEvent) { |
300 | 300 | $payloadManipulatingSerializer->manipulateEventsOfClass( |
301 | 301 | $refactoredPlaceEvent, |
302 | - function (array $serializedObject) { |
|
302 | + function(array $serializedObject) { |
|
303 | 303 | $serializedObject = self::replacePlaceIdWithItemId($serializedObject); |
304 | 304 | return $serializedObject; |
305 | 305 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | foreach ($labelCollection->asArray() as $label) { |
187 | 187 | $this->writeRepository->save( |
188 | - new LabelName((string) $label), |
|
188 | + new LabelName((string)$label), |
|
189 | 189 | $relationType, |
190 | 190 | $relationId |
191 | 191 | ); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | { |
201 | 201 | $labelRelation = null; |
202 | 202 | |
203 | - $labelName = new LabelName((string) $labelEvent->getLabel()); |
|
203 | + $labelName = new LabelName((string)$labelEvent->getLabel()); |
|
204 | 204 | $relationType = $this->offerTypeResolver->getRelationType($labelEvent); |
205 | 205 | $relationId = new StringLiteral($labelEvent->getItemId()); |
206 | 206 |
@@ -15,13 +15,13 @@ |
||
15 | 15 | ); |
16 | 16 | |
17 | 17 | $visibleLabels = $labelCollection->filter( |
18 | - function (Label $label) { |
|
18 | + function(Label $label) { |
|
19 | 19 | return $label->isVisible(); |
20 | 20 | } |
21 | 21 | )->toStrings(); |
22 | 22 | |
23 | 23 | $hiddenLabels = $labelCollection->filter( |
24 | - function (Label $label) { |
|
24 | + function(Label $label) { |
|
25 | 25 | return !$label->isVisible(); |
26 | 26 | } |
27 | 27 | )->toStrings(); |