Completed
Pull Request — master (#243)
by Luc
04:56
created
src/Event/ReadModel/JSONLD/Specifications/Labelable.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Translation.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Event/Events/CollaborationDataAdded.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/CollaborationData.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -268,15 +268,15 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/Media/MediaObject.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Event/ReadModel/JSONLD/CdbXMLImporter.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     private function dateFromUdb2UnixTime($unixTime)
163 163
     {
164 164
         $dateTime = new \DateTime(
165
-            '@' . $unixTime,
165
+            '@'.$unixTime,
166 166
             new \DateTimeZone('Europe/Brussels')
167 167
         );
168 168
 
@@ -201,21 +201,21 @@  discard block
 block discarded – undo
201 201
 
202 202
         $validKeywords = array_filter(
203 203
             $keywords,
204
-            function (CultureFeed_Cdb_Data_Keyword $keyword) {
204
+            function(CultureFeed_Cdb_Data_Keyword $keyword) {
205 205
                 return strlen(trim($keyword->getValue())) > 0;
206 206
             }
207 207
         );
208 208
 
209 209
         $visibleKeywords = 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
         );
215 215
 
216 216
         $hiddenKeywords = array_filter(
217 217
             $validKeywords,
218
-            function (CultureFeed_Cdb_Data_Keyword $keyword) {
218
+            function(CultureFeed_Cdb_Data_Keyword $keyword) {
219 219
                 return !$keyword->isVisible();
220 220
             }
221 221
         );
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     private function addKeywordsAsLabelsProperty($jsonLD, $labelsPropertyName, array $keywords)
234 234
     {
235 235
         $labels = array_map(
236
-            function ($keyword) {
236
+            function($keyword) {
237 237
                 /** @var CultureFeed_Cdb_Data_Keyword $keyword */
238 238
                 return $keyword->getValue();
239 239
             },
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
                     'addressLocality' => $address->getCity(),
320 320
                     'postalCode' => $address->getZip(),
321 321
                     'streetAddress' =>
322
-                        $address->getStreet() . ' ' . $address->getHouseNumber(
322
+                        $address->getStreet().' '.$address->getHouseNumber(
323 323
                         ),
324 324
                 );
325 325
             }
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
     ) {
500 500
         $contactInfo = $event->getContactInfo();
501 501
 
502
-        $notForReservations = function ($item) {
502
+        $notForReservations = function($item) {
503 503
             /** @var \CultureFeed_Cdb_Data_Url|\CultureFeed_Cdb_Data_Phone|\CultureFeed_Cdb_Data_Mail $item */
504 504
             return !$item->isForReservations();
505 505
         };
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 
512 512
             if (!empty($emails)) {
513 513
                 $contactPoint['email'] = array_map(
514
-                    function (\CultureFeed_Cdb_Data_Mail $email) {
514
+                    function(\CultureFeed_Cdb_Data_Mail $email) {
515 515
                         return $email->getMailAddress();
516 516
                     },
517 517
                     $emails
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 
524 524
             if (!empty($phones)) {
525 525
                 $contactPoint['phone'] = array_map(
526
-                    function (\CultureFeed_Cdb_Data_phone $phone) {
526
+                    function(\CultureFeed_Cdb_Data_phone $phone) {
527 527
                         return $phone->getNumber();
528 528
                     },
529 529
                     $phones
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 
536 536
             if (!empty($urls)) {
537 537
                 $contactPoint['url'] = array_map(
538
-                    function (\CultureFeed_Cdb_Data_Url $url) {
538
+                    function(\CultureFeed_Cdb_Data_Url $url) {
539 539
                         return $url->getUrl();
540 540
                     },
541 541
                     $urls
@@ -606,14 +606,14 @@  discard block
 block discarded – undo
606 606
         if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) {
607 607
             /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */
608 608
             $period = $cdbCalendar->current();
609
-            $startDateString = $period->getDateFrom() . 'T00:00:00';
609
+            $startDateString = $period->getDateFrom().'T00:00:00';
610 610
         } else if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) {
611 611
             /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */
612 612
             $timestamp = $cdbCalendar->current();
613 613
             if ($timestamp->getStartTime()) {
614
-                $startDateString = $timestamp->getDate() . 'T' . $timestamp->getStartTime();
614
+                $startDateString = $timestamp->getDate().'T'.$timestamp->getStartTime();
615 615
             } else {
616
-                $startDateString = $timestamp->getDate() . 'T00:00:00';
616
+                $startDateString = $timestamp->getDate().'T00:00:00';
617 617
             }
618 618
         }
619 619
         $startDate = !empty($startDateString) ? DateTimeFactory::dateTimeFromDateString($startDateString) : null;
@@ -626,17 +626,17 @@  discard block
 block discarded – undo
626 626
         if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_PeriodList) {
627 627
             /** @var \CultureFeed_Cdb_Data_Calendar_Period $period */
628 628
             $period = $cdbCalendar->current();
629
-            $endDateString = $period->getDateTo() . 'T00:00:00';
629
+            $endDateString = $period->getDateTo().'T00:00:00';
630 630
         } else if ($cdbCalendar instanceof \CultureFeed_Cdb_Data_Calendar_TimestampList) {
631 631
             $firstTimestamp = $cdbCalendar->current();
632 632
             /** @var \CultureFeed_Cdb_Data_Calendar_Timestamp $timestamp */
633 633
             $cdbCalendarAsArray = iterator_to_array($cdbCalendar);
634 634
             $timestamp = iterator_count($cdbCalendar) > 1 ? end($cdbCalendarAsArray) : $firstTimestamp;
635 635
             if ($timestamp->getEndTime()) {
636
-                $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime();
636
+                $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime();
637 637
             } else {
638 638
                 $endTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00';
639
-                $endDateString = $timestamp->getDate() . 'T' . $endTime;
639
+                $endDateString = $timestamp->getDate().'T'.$endTime;
640 640
             }
641 641
         }
642 642
         $endDate = !empty($endDateString) ? DateTimeFactory::dateTimeFromDateString($endDateString) : null;
@@ -653,13 +653,13 @@  discard block
 block discarded – undo
653 653
                 $cdbCalendar->next();
654 654
 
655 655
                 if ($timestamp->getStartTime()) {
656
-                    $startDateString = $timestamp->getDate() . 'T' . $timestamp->getStartTime();
656
+                    $startDateString = $timestamp->getDate().'T'.$timestamp->getStartTime();
657 657
 
658 658
                     if ($timestamp->getEndTime()) {
659
-                        $endDateString = $timestamp->getDate() . 'T' . $timestamp->getEndTime();
659
+                        $endDateString = $timestamp->getDate().'T'.$timestamp->getEndTime();
660 660
                     } else {
661 661
                         $endTime = $timestamp->getStartTime() ? $timestamp->getStartTime() : '00:00:00';
662
-                        $endDateString = $timestamp->getDate() . 'T' . $endTime;
662
+                        $endDateString = $timestamp->getDate().'T'.$endTime;
663 663
                     }
664 664
                 }
665 665
 
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
                 foreach ($openingHours as $openingHour) {
728 728
                     $openingHoursAsArray[] = [
729 729
                         'dayOfWeek' => array_map(
730
-                            function (WeekDay $weekDay) {
730
+                            function(WeekDay $weekDay) {
731 731
                                 return strtolower($weekDay->toNative());
732 732
                             },
733 733
                             $openingHour->getWeekDays()
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
             $slug = '';
846 846
         }
847 847
 
848
-        $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId();
848
+        $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId();
849 849
 
850 850
 
851 851
         if (!property_exists($jsonLD, 'sameAs')) {
Please login to merge, or discard this patch.
src/SearchAPI2/Filters/DoesNotHaveKeyword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/Event/ReadModel/Relations/Projector.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/EventExport/EventExportService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@
 block discarded – undo
209 209
      * Generator that yields each unique search result.
210 210
      *
211 211
      * @param int $totalItemCount
212
-     * @param string|object $query
212
+     * @param EventExportQuery $query
213 213
      * @param LoggerInterface $logger
214 214
      *
215 215
      * @return \Generator
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
             if (!$moved) {
159 159
                 throw new \RuntimeException(
160
-                    'Unable to move export file to public directory ' .
160
+                    'Unable to move export file to public directory '.
161 161
                     $this->publicDirectory
162 162
                 );
163 163
             }
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
     ) {
245 245
         $fileUniqueId = basename($tmpPath);
246 246
         $extension = $fileFormat->getFileNameExtension();
247
-        $finalFileName = $fileUniqueId . '.' . $extension;
248
-        $finalPath = $this->publicDirectory . '/' . $finalFileName;
247
+        $finalFileName = $fileUniqueId.'.'.$extension;
248
+        $finalPath = $this->publicDirectory.'/'.$finalFileName;
249 249
 
250 250
         return $finalPath;
251 251
     }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         var_dump($events);
265 265
 
266 266
         foreach ($events as $eventIdentifier) {
267
-            $event = $this->getEvent((string) $eventIdentifier->getIri(), $logger);
267
+            $event = $this->getEvent((string)$eventIdentifier->getIri(), $logger);
268 268
 
269 269
             if ($event) {
270 270
                 yield $eventIdentifier->getId() => $event;
Please login to merge, or discard this patch.