Completed
Pull Request — master (#234)
by Kristof
04:46
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   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     private function dateFromUdb2UnixTime($unixTime)
133 133
     {
134 134
         $dateTime = new \DateTime(
135
-            '@' . $unixTime,
135
+            '@'.$unixTime,
136 136
             new \DateTimeZone('Europe/Brussels')
137 137
         );
138 138
 
@@ -171,21 +171,21 @@  discard block
 block discarded – undo
171 171
 
172 172
         $validKeywords = array_filter(
173 173
             $keywords,
174
-            function (CultureFeed_Cdb_Data_Keyword $keyword) {
174
+            function(CultureFeed_Cdb_Data_Keyword $keyword) {
175 175
                 return strlen(trim($keyword->getValue())) > 0;
176 176
             }
177 177
         );
178 178
 
179 179
         $visibleKeywords = array_filter(
180 180
             $validKeywords,
181
-            function (CultureFeed_Cdb_Data_Keyword $keyword) {
181
+            function(CultureFeed_Cdb_Data_Keyword $keyword) {
182 182
                 return $keyword->isVisible();
183 183
             }
184 184
         );
185 185
 
186 186
         $hiddenKeywords = array_filter(
187 187
             $validKeywords,
188
-            function (CultureFeed_Cdb_Data_Keyword $keyword) {
188
+            function(CultureFeed_Cdb_Data_Keyword $keyword) {
189 189
                 return !$keyword->isVisible();
190 190
             }
191 191
         );
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     private function addKeywordsAsLabelsProperty($jsonLD, $labelsPropertyName, array $keywords)
204 204
     {
205 205
         $labels = array_map(
206
-            function ($keyword) {
206
+            function($keyword) {
207 207
                 /** @var CultureFeed_Cdb_Data_Keyword $keyword */
208 208
                 return $keyword->getValue();
209 209
             },
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                     'addressLocality' => $address->getCity(),
260 260
                     'postalCode' => $address->getZip(),
261 261
                     'streetAddress' =>
262
-                        $address->getStreet() . ' ' . $address->getHouseNumber(
262
+                        $address->getStreet().' '.$address->getHouseNumber(
263 263
                         ),
264 264
                 );
265 265
             }
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
             $calendarType = 'periodic';
447 447
             $calendar->rewind();
448 448
             $firstCalendarItem = $calendar->current();
449
-            $startDateString = $firstCalendarItem->getDateFrom() . 'T00:00:00';
449
+            $startDateString = $firstCalendarItem->getDateFrom().'T00:00:00';
450 450
             $startDate = DateTimeFactory::dateTimeFromDateString($startDateString);
451 451
 
452 452
             if (iterator_count($calendar) > 1) {
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                 $lastCalendarItem = $firstCalendarItem;
457 457
             }
458 458
 
459
-            $endDateString = $lastCalendarItem->getDateTo() . 'T00:00:00';
459
+            $endDateString = $lastCalendarItem->getDateTo().'T00:00:00';
460 460
             $endDate = DateTimeFactory::dateTimeFromDateString($endDateString);
461 461
 
462 462
             $jsonLD->startDate = $startDate->format('c');
@@ -468,9 +468,9 @@  discard block
 block discarded – undo
468 468
             $firstCalendarItem = $calendar->current();
469 469
             if ($firstCalendarItem->getStartTime()) {
470 470
                 $dateString =
471
-                    $firstCalendarItem->getDate() . 'T' . $firstCalendarItem->getStartTime();
471
+                    $firstCalendarItem->getDate().'T'.$firstCalendarItem->getStartTime();
472 472
             } else {
473
-                $dateString = $firstCalendarItem->getDate() . 'T00:00:00';
473
+                $dateString = $firstCalendarItem->getDate().'T00:00:00';
474 474
             }
475 475
 
476 476
             $startDate = DateTimeFactory::dateTimeFromDateString($dateString);
@@ -485,10 +485,10 @@  discard block
 block discarded – undo
485 485
             $endDateString = null;
486 486
             if ($lastCalendarItem->getEndTime()) {
487 487
                 $endDateString =
488
-                    $lastCalendarItem->getDate() . 'T' . $lastCalendarItem->getEndTime();
488
+                    $lastCalendarItem->getDate().'T'.$lastCalendarItem->getEndTime();
489 489
             } else {
490 490
                 if (iterator_count($calendar) > 1) {
491
-                    $endDateString = $lastCalendarItem->getDate() . 'T00:00:00';
491
+                    $endDateString = $lastCalendarItem->getDate().'T00:00:00';
492 492
                 }
493 493
             }
494 494
 
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
             $slug = '';
603 603
         }
604 604
 
605
-        $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId();
605
+        $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId();
606 606
 
607 607
 
608 608
         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.