Completed
Pull Request — master (#253)
by Kristof
04:43
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/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.
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.