@@ -38,7 +38,7 @@ |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * @return mixed The object instance |
|
41 | + * @return TranslationDeleted The object instance |
|
42 | 42 | */ |
43 | 43 | public static function deserialize(array $data) |
44 | 44 | { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | |
10 | 10 | /** |
11 | - * @param $eventLd |
|
11 | + * @param \stdClass $eventLd |
|
12 | 12 | * @return bool |
13 | 13 | */ |
14 | 14 | public function hasLabel($eventLd, String $label) |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace CultuurNet\UDB3\Event\ReadModel\JSONLD\Specifications; |
4 | 4 | |
5 | -use ValueObjects\String\String; |
|
6 | - |
|
7 | 5 | trait Labelable |
8 | 6 | { |
9 | 7 |
@@ -36,9 +36,9 @@ |
||
36 | 36 | /** |
37 | 37 | * Translation constructor. |
38 | 38 | * @param Language $language |
39 | - * @param String|null $title |
|
40 | - * @param String|null $shortDescription |
|
41 | - * @param String|null $longDescription |
|
39 | + * @param null|string $title |
|
40 | + * @param null|string $shortDescription |
|
41 | + * @param null|string $longDescription |
|
42 | 42 | */ |
43 | 43 | public function __construct( |
44 | 44 | Language $language, |
@@ -86,7 +86,7 @@ |
||
86 | 86 | public function serialize() |
87 | 87 | { |
88 | 88 | $serialized = array( |
89 | - 'eventId' => (string) $this->eventId, |
|
89 | + 'eventId' => (string)$this->eventId, |
|
90 | 90 | 'language' => $this->language->getCode(), |
91 | 91 | 'collaborationData' => $this->collaborationData->serialize(), |
92 | 92 | ); |
@@ -268,15 +268,15 @@ |
||
268 | 268 | public function serialize() |
269 | 269 | { |
270 | 270 | $data = [ |
271 | - 'subBrand' => (string) $this->subBrand, |
|
272 | - 'plainText' => (string) $this->plainText, |
|
273 | - 'title' => (string) $this->title, |
|
274 | - 'text' => (string) $this->text, |
|
275 | - 'copyright' => (string) $this->copyright, |
|
276 | - 'keyword' => (string) $this->keyword, |
|
277 | - 'image' => (string) $this->image, |
|
278 | - 'article' => (string) $this->article, |
|
279 | - 'link' => (string) $this->link, |
|
271 | + 'subBrand' => (string)$this->subBrand, |
|
272 | + 'plainText' => (string)$this->plainText, |
|
273 | + 'title' => (string)$this->title, |
|
274 | + 'text' => (string)$this->text, |
|
275 | + 'copyright' => (string)$this->copyright, |
|
276 | + 'keyword' => (string)$this->keyword, |
|
277 | + 'image' => (string)$this->image, |
|
278 | + 'article' => (string)$this->article, |
|
279 | + 'link' => (string)$this->link, |
|
280 | 280 | ]; |
281 | 281 | |
282 | 282 | return array_filter($data, 'strlen'); |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace CultuurNet\UDB3\Media; |
4 | 4 | |
5 | 5 | use Broadway\EventSourcing\EventSourcedAggregateRoot; |
6 | -use Broadway\Serializer\SerializableInterface; |
|
7 | 6 | use CultuurNet\UDB3\JsonLdSerializableInterface; |
8 | 7 | use CultuurNet\UDB3\Media\Events\MediaObjectCreated; |
9 | 8 | use CultuurNet\UDB3\Media\Properties\MIMEType; |
@@ -164,7 +164,7 @@ |
||
164 | 164 | |
165 | 165 | /** |
166 | 166 | * @param \CultureFeed_Cdb_Item_Event $event |
167 | - * @param $jsonLD |
|
167 | + * @param \stdClass $jsonLD |
|
168 | 168 | */ |
169 | 169 | private function importLabels(\CultureFeed_Cdb_Item_Event $event, $jsonLD) |
170 | 170 | { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | private function dateFromUdb2UnixTime($unixTime) |
156 | 156 | { |
157 | 157 | $dateTime = new \DateTime( |
158 | - '@' . $unixTime, |
|
158 | + '@'.$unixTime, |
|
159 | 159 | new \DateTimeZone('Europe/Brussels') |
160 | 160 | ); |
161 | 161 | |
@@ -194,21 +194,21 @@ discard block |
||
194 | 194 | |
195 | 195 | $validKeywords = array_filter( |
196 | 196 | $keywords, |
197 | - function (CultureFeed_Cdb_Data_Keyword $keyword) { |
|
197 | + function(CultureFeed_Cdb_Data_Keyword $keyword) { |
|
198 | 198 | return strlen(trim($keyword->getValue())) > 0; |
199 | 199 | } |
200 | 200 | ); |
201 | 201 | |
202 | 202 | $visibleKeywords = array_filter( |
203 | 203 | $validKeywords, |
204 | - function (CultureFeed_Cdb_Data_Keyword $keyword) { |
|
204 | + function(CultureFeed_Cdb_Data_Keyword $keyword) { |
|
205 | 205 | return $keyword->isVisible(); |
206 | 206 | } |
207 | 207 | ); |
208 | 208 | |
209 | 209 | $hiddenKeywords = array_filter( |
210 | 210 | $validKeywords, |
211 | - function (CultureFeed_Cdb_Data_Keyword $keyword) { |
|
211 | + function(CultureFeed_Cdb_Data_Keyword $keyword) { |
|
212 | 212 | return !$keyword->isVisible(); |
213 | 213 | } |
214 | 214 | ); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | private function addKeywordsAsLabelsProperty($jsonLD, $labelsPropertyName, array $keywords) |
227 | 227 | { |
228 | 228 | $labels = array_map( |
229 | - function ($keyword) { |
|
229 | + function($keyword) { |
|
230 | 230 | /** @var CultureFeed_Cdb_Data_Keyword $keyword */ |
231 | 231 | return $keyword->getValue(); |
232 | 232 | }, |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | 'addressLocality' => $address->getCity(), |
313 | 313 | 'postalCode' => $address->getZip(), |
314 | 314 | 'streetAddress' => |
315 | - $address->getStreet() . ' ' . $address->getHouseNumber( |
|
315 | + $address->getStreet().' '.$address->getHouseNumber( |
|
316 | 316 | ), |
317 | 317 | ); |
318 | 318 | } |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | ) { |
494 | 494 | $contactInfo = $event->getContactInfo(); |
495 | 495 | |
496 | - $notForReservations = function ($item) { |
|
496 | + $notForReservations = function($item) { |
|
497 | 497 | /** @var \CultureFeed_Cdb_Data_Url|\CultureFeed_Cdb_Data_Phone|\CultureFeed_Cdb_Data_Mail $item */ |
498 | 498 | return !$item->isForReservations(); |
499 | 499 | }; |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | |
506 | 506 | if (!empty($emails)) { |
507 | 507 | $contactPoint['email'] = array_map( |
508 | - function (\CultureFeed_Cdb_Data_Mail $email) { |
|
508 | + function(\CultureFeed_Cdb_Data_Mail $email) { |
|
509 | 509 | return $email->getMailAddress(); |
510 | 510 | }, |
511 | 511 | $emails |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | |
518 | 518 | if (!empty($phones)) { |
519 | 519 | $contactPoint['phone'] = array_map( |
520 | - function (\CultureFeed_Cdb_Data_phone $phone) { |
|
520 | + function(\CultureFeed_Cdb_Data_phone $phone) { |
|
521 | 521 | return $phone->getNumber(); |
522 | 522 | }, |
523 | 523 | $phones |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | |
530 | 530 | if (!empty($urls)) { |
531 | 531 | $contactPoint['url'] = array_map( |
532 | - function (\CultureFeed_Cdb_Data_Url $url) { |
|
532 | + function(\CultureFeed_Cdb_Data_Url $url) { |
|
533 | 533 | return $url->getUrl(); |
534 | 534 | }, |
535 | 535 | $urls |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | $calendarType = 'periodic'; |
589 | 589 | $calendar->rewind(); |
590 | 590 | $firstCalendarItem = $calendar->current(); |
591 | - $startDateString = $firstCalendarItem->getDateFrom() . 'T00:00:00'; |
|
591 | + $startDateString = $firstCalendarItem->getDateFrom().'T00:00:00'; |
|
592 | 592 | $startDate = DateTimeFactory::dateTimeFromDateString($startDateString); |
593 | 593 | |
594 | 594 | if (iterator_count($calendar) > 1) { |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | $lastCalendarItem = $firstCalendarItem; |
599 | 599 | } |
600 | 600 | |
601 | - $endDateString = $lastCalendarItem->getDateTo() . 'T00:00:00'; |
|
601 | + $endDateString = $lastCalendarItem->getDateTo().'T00:00:00'; |
|
602 | 602 | $endDate = DateTimeFactory::dateTimeFromDateString($endDateString); |
603 | 603 | |
604 | 604 | $jsonLD->startDate = $startDate->format('c'); |
@@ -610,9 +610,9 @@ discard block |
||
610 | 610 | $firstCalendarItem = $calendar->current(); |
611 | 611 | if ($firstCalendarItem->getStartTime()) { |
612 | 612 | $dateString = |
613 | - $firstCalendarItem->getDate() . 'T' . $firstCalendarItem->getStartTime(); |
|
613 | + $firstCalendarItem->getDate().'T'.$firstCalendarItem->getStartTime(); |
|
614 | 614 | } else { |
615 | - $dateString = $firstCalendarItem->getDate() . 'T00:00:00'; |
|
615 | + $dateString = $firstCalendarItem->getDate().'T00:00:00'; |
|
616 | 616 | } |
617 | 617 | |
618 | 618 | $startDate = DateTimeFactory::dateTimeFromDateString($dateString); |
@@ -627,10 +627,10 @@ discard block |
||
627 | 627 | $endDateString = null; |
628 | 628 | if ($lastCalendarItem->getEndTime()) { |
629 | 629 | $endDateString = |
630 | - $lastCalendarItem->getDate() . 'T' . $lastCalendarItem->getEndTime(); |
|
630 | + $lastCalendarItem->getDate().'T'.$lastCalendarItem->getEndTime(); |
|
631 | 631 | } else { |
632 | 632 | if (iterator_count($calendar) > 1) { |
633 | - $endDateString = $lastCalendarItem->getDate() . 'T00:00:00'; |
|
633 | + $endDateString = $lastCalendarItem->getDate().'T00:00:00'; |
|
634 | 634 | } |
635 | 635 | } |
636 | 636 | |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | $slug = ''; |
745 | 745 | } |
746 | 746 | |
747 | - $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId(); |
|
747 | + $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId(); |
|
748 | 748 | |
749 | 749 | |
750 | 750 | if (!property_exists($jsonLD, 'sameAs')) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function __construct($keyword) |
15 | 15 | { |
16 | - $keyword = (string) $keyword; |
|
16 | + $keyword = (string)$keyword; |
|
17 | 17 | |
18 | 18 | $this->filterQuery = new FilterQuery( |
19 | 19 | sprintf( |
@@ -110,8 +110,8 @@ |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
113 | - * @param EventUpdatedFromCdbXml $eventUpdatedFromCdbXml |
|
114 | - */ |
|
113 | + * @param EventUpdatedFromCdbXml $eventUpdatedFromCdbXml |
|
114 | + */ |
|
115 | 115 | protected function applyEventUpdatedFromCdbXml(EventUpdatedFromCdbXml $eventUpdatedFromCdbXml) |
116 | 116 | { |
117 | 117 | $eventId = $eventUpdatedFromCdbXml->getEventId(); |