Completed
Pull Request — master (#241)
by Kristof
04:38
created
src/Event/ReadModel/JSONLD/CdbXMLImporter.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     ) {
472 472
         $contactInfo = $event->getContactInfo();
473 473
 
474
-        $notForReservations = function (\CultureFeed_Cdb_Data_UseableForReservations $item) {
474
+        $notForReservations = function(\CultureFeed_Cdb_Data_UseableForReservations $item) {
475 475
             return !$item->isForReservations();
476 476
         };
477 477
 
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 
483 483
             if (!empty($emails)) {
484 484
                 $contactPoint['email'] = array_map(
485
-                    function (\CultureFeed_Cdb_Data_Mail $email) {
485
+                    function(\CultureFeed_Cdb_Data_Mail $email) {
486 486
                         return $email->getMailAddress();
487 487
                     },
488 488
                     $emails
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 
495 495
             if (!empty($phones)) {
496 496
                 $contactPoint['phone'] = array_map(
497
-                    function (\CultureFeed_Cdb_Data_phone $phone) {
497
+                    function(\CultureFeed_Cdb_Data_phone $phone) {
498 498
                         return $phone->getNumber();
499 499
                     },
500 500
                     $phones
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 
507 507
             if (!empty($urls)) {
508 508
                 $contactPoint['url'] = array_map(
509
-                    function (\CultureFeed_Cdb_Data_Url $url) {
509
+                    function(\CultureFeed_Cdb_Data_Url $url) {
510 510
                         return $url->getUrl();
511 511
                     },
512 512
                     $urls
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
             $calendarType = 'periodic';
566 566
             $calendar->rewind();
567 567
             $firstCalendarItem = $calendar->current();
568
-            $startDateString = $firstCalendarItem->getDateFrom() . 'T00:00:00';
568
+            $startDateString = $firstCalendarItem->getDateFrom().'T00:00:00';
569 569
             $startDate = DateTimeFactory::dateTimeFromDateString($startDateString);
570 570
 
571 571
             if (iterator_count($calendar) > 1) {
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
                 $lastCalendarItem = $firstCalendarItem;
576 576
             }
577 577
 
578
-            $endDateString = $lastCalendarItem->getDateTo() . 'T00:00:00';
578
+            $endDateString = $lastCalendarItem->getDateTo().'T00:00:00';
579 579
             $endDate = DateTimeFactory::dateTimeFromDateString($endDateString);
580 580
 
581 581
             $jsonLD->startDate = $startDate->format('c');
@@ -587,9 +587,9 @@  discard block
 block discarded – undo
587 587
             $firstCalendarItem = $calendar->current();
588 588
             if ($firstCalendarItem->getStartTime()) {
589 589
                 $dateString =
590
-                    $firstCalendarItem->getDate() . 'T' . $firstCalendarItem->getStartTime();
590
+                    $firstCalendarItem->getDate().'T'.$firstCalendarItem->getStartTime();
591 591
             } else {
592
-                $dateString = $firstCalendarItem->getDate() . 'T00:00:00';
592
+                $dateString = $firstCalendarItem->getDate().'T00:00:00';
593 593
             }
594 594
 
595 595
             $startDate = DateTimeFactory::dateTimeFromDateString($dateString);
@@ -604,10 +604,10 @@  discard block
 block discarded – undo
604 604
             $endDateString = null;
605 605
             if ($lastCalendarItem->getEndTime()) {
606 606
                 $endDateString =
607
-                    $lastCalendarItem->getDate() . 'T' . $lastCalendarItem->getEndTime();
607
+                    $lastCalendarItem->getDate().'T'.$lastCalendarItem->getEndTime();
608 608
             } else {
609 609
                 if (iterator_count($calendar) > 1) {
610
-                    $endDateString = $lastCalendarItem->getDate() . 'T00:00:00';
610
+                    $endDateString = $lastCalendarItem->getDate().'T00:00:00';
611 611
                 }
612 612
             }
613 613
 
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
             $slug = '';
722 722
         }
723 723
 
724
-        $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId();
724
+        $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId();
725 725
 
726 726
 
727 727
         if (!property_exists($jsonLD, 'sameAs')) {
Please login to merge, or discard this patch.