Completed
Pull Request — master (#137)
by Kristof
04:51
created
src/CollaborationData.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-     * @return String|null
60
+     * @return String
61 61
      */
62 62
     public function getSubBrand()
63 63
     {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
     /**
79
-     * @return String|null
79
+     * @return String
80 80
      */
81 81
     public function getTitle()
82 82
     {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     }
96 96
 
97 97
     /**
98
-     * @return String|null
98
+     * @return String
99 99
      */
100 100
     public function getText()
101 101
     {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     }
115 115
 
116 116
     /**
117
-     * @return String|null
117
+     * @return String
118 118
      */
119 119
     public function getCopyright()
120 120
     {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     }
134 134
 
135 135
     /**
136
-     * @return String|null
136
+     * @return String
137 137
      */
138 138
     public function getKeyword()
139 139
     {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     }
153 153
 
154 154
     /**
155
-     * @return String|null
155
+     * @return String
156 156
      */
157 157
     public function getArticle()
158 158
     {
Please login to merge, or discard this 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/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/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/Offer/ReadModel/JSONLD/CdbXMLItemBaseImporter.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Variations;
7 7
 
Please login to merge, or discard this patch.
src/Place/ReadModel/JSONLD/PlaceLDProjector.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@
 block discarded – undo
295 295
         $placeLd = $document->getBody();
296 296
 
297 297
         $placeLd->organizer = array(
298
-          '@type' => 'Organizer',
298
+            '@type' => 'Organizer',
299 299
         ) + (array)$this->organizerJSONLD($organizerUpdated->getOrganizerId());
300 300
 
301 301
         $this->repository->save($document->withBody($placeLd));
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -12,13 +12,11 @@  discard block
 block discarded – undo
12 12
 use CultuurNet\UDB3\EntityServiceInterface;
13 13
 use CultuurNet\UDB3\Event\EventType;
14 14
 use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface;
15
-use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait;
16 15
 use CultuurNet\UDB3\Facility;
17 16
 use CultuurNet\UDB3\Iri\IriGeneratorInterface;
18 17
 use CultuurNet\UDB3\Offer\ReadModel\JSONLD\CdbXMLItemBaseImporter;
19 18
 use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferLDProjector;
20 19
 use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferUpdate;
21
-use CultuurNet\UDB3\Offer\ReadModel\OfferJsonDocument;
22 20
 use CultuurNet\UDB3\Place\Events\BookingInfoUpdated;
23 21
 use CultuurNet\UDB3\Place\Events\ContactPointUpdated;
24 22
 use CultuurNet\UDB3\Place\Events\DescriptionUpdated;
@@ -40,7 +38,6 @@  discard block
 block discarded – undo
40 38
 use CultuurNet\UDB3\Place\PlaceEvent;
41 39
 use CultuurNet\UDB3\Place\ReadModel\JSONLD\CdbXMLImporter;
42 40
 use CultuurNet\UDB3\ReadModel\JsonDocument;
43
-use CultuurNet\UDB3\SluggerInterface;
44 41
 use CultuurNet\UDB3\Theme;
45 42
 use Symfony\Component\Serializer\SerializerInterface;
46 43
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $jsonLD->address = $placeCreated->getAddress()->toJsonLd();
161 161
 
162 162
         $calendarJsonLD = $placeCreated->getCalendar()->toJsonLd();
163
-        $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD);
163
+        $jsonLD = (object)array_merge((array)$jsonLD, $calendarJsonLD);
164 164
 
165 165
         $eventType = $placeCreated->getEventType();
166 166
         $jsonLD->terms = [
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
         $jsonLD->address = $majorInfoUpdated->getAddress()->toJsonLd();
215 215
 
216 216
         // Remove old theme and event type.
217
-        $jsonLD->terms = array_filter($jsonLD->terms, function ($term) {
218
-            return $term->domain !== EventType::DOMAIN &&  $term->domain !== Theme::DOMAIN;
217
+        $jsonLD->terms = array_filter($jsonLD->terms, function($term) {
218
+            return $term->domain !== EventType::DOMAIN && $term->domain !== Theme::DOMAIN;
219 219
         });
220 220
 
221 221
         $eventType = $majorInfoUpdated->getEventType();
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
         // Remove all old facilities + get numeric keys.
362 362
         $terms = array_values(array_filter(
363 363
             $terms,
364
-            function ($term) {
364
+            function($term) {
365 365
                 return $term->domain !== Facility::DOMAIN;
366 366
             }
367 367
         ));
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/Place/Events/PlaceImportedFromUDB2Event.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file
4
- */
3
+     * @file
4
+     */
5 5
 
6 6
 namespace CultuurNet\UDB3\Variations;
7 7
 
Please login to merge, or discard this patch.
src/Media/Serialization/MediaObjectSerializer.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,9 @@
 block discarded – undo
3 3
 namespace CultuurNet\UDB3\Media\Serialization;
4 4
 
5 5
 use CultuurNet\UDB3\Iri\IriGeneratorInterface;
6
-use CultuurNet\UDB3\Media\MediaObject;
7 6
 use CultuurNet\UDB3\Media\Properties\MIMEType;
8
-use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
9 7
 use Symfony\Component\Serializer\Exception\UnsupportedException;
10 8
 use Symfony\Component\Serializer\SerializerInterface;
11
-use ValueObjects\Web\Url;
12 9
 
13 10
 class MediaObjectSerializer implements SerializerInterface
14 11
 {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
         $normalizedData = [
37 37
             '@id' => $this->iriGenerator->iri($mediaObject->getMediaObjectId()),
38 38
             '@type' => $this->serializeMimeType($mediaObject->getMimeType()),
39
-            'contentUrl' => (string) $mediaObject->getSourceLocation(),
40
-            'thumbnailUrl' => (string) $mediaObject->getSourceLocation(),
41
-            'description' => (string) $mediaObject->getDescription(),
42
-            'copyrightHolder' => (string) $mediaObject->getCopyrightHolder(),
39
+            'contentUrl' => (string)$mediaObject->getSourceLocation(),
40
+            'thumbnailUrl' => (string)$mediaObject->getSourceLocation(),
41
+            'description' => (string)$mediaObject->getDescription(),
42
+            'copyrightHolder' => (string)$mediaObject->getCopyrightHolder(),
43 43
         ];
44 44
 
45 45
         return $normalizedData;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function serializeMimeType(MIMEType $mimeType)
49 49
     {
50
-        $typeParts = explode('/', (string) $mimeType);
50
+        $typeParts = explode('/', (string)$mimeType);
51 51
         $type = array_shift($typeParts);
52 52
 
53 53
         if ($type !== 'image') {
Please login to merge, or discard this patch.
src/Media/MediaManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             Url::fromNative($destinationIri)
116 116
         );
117 117
 
118
-        $jobInfo = ['file_id' => (string) $uploadImage->getFileId()];
118
+        $jobInfo = ['file_id' => (string)$uploadImage->getFileId()];
119 119
         $this->logger->info('job_info', $jobInfo);
120 120
     }
121 121
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     public function get(UUID $fileId)
126 126
     {
127 127
         try {
128
-            $mediaObject = $this->repository->load((string) $fileId);
128
+            $mediaObject = $this->repository->load((string)$fileId);
129 129
         } catch (AggregateNotFoundException $e) {
130 130
             throw new MediaObjectNotFoundException(
131 131
                 sprintf("Media object with id '%s' not found", $fileId),
Please login to merge, or discard this patch.