Completed
Pull Request — master (#241)
by Kristof
07:21 queued 02:55
created
src/Event/Events/TranslationDeleted.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
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   +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.
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.