@@ -36,9 +36,9 @@ |
||
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, |
@@ -3,7 +3,6 @@ |
||
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; |
@@ -13,7 +13,7 @@ |
||
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( |
@@ -110,8 +110,8 @@ |
||
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(); |
@@ -209,7 +209,7 @@ |
||
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 |
@@ -157,7 +157,7 @@ discard block |
||
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 |
||
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 |
||
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; |
@@ -3,12 +3,9 @@ |
||
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 | { |
@@ -36,10 +36,10 @@ discard block |
||
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 |
||
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') { |
@@ -109,11 +109,11 @@ |
||
109 | 109 | public function serialize() |
110 | 110 | { |
111 | 111 | return [ |
112 | - 'media_object_id' => (string) $this->getMediaObjectId(), |
|
113 | - 'mime_type' => (string) $this->getMimeType(), |
|
114 | - 'description' => (string) $this->getDescription(), |
|
115 | - 'copyright_holder' => (string) $this->getCopyrightHolder(), |
|
116 | - 'source_location' => (string) $this->getSourceLocation() |
|
112 | + 'media_object_id' => (string)$this->getMediaObjectId(), |
|
113 | + 'mime_type' => (string)$this->getMimeType(), |
|
114 | + 'description' => (string)$this->getDescription(), |
|
115 | + 'copyright_holder' => (string)$this->getCopyrightHolder(), |
|
116 | + 'source_location' => (string)$this->getSourceLocation() |
|
117 | 117 | ]; |
118 | 118 | } |
119 | 119 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | 'mime_type' => $this->getMimeType()->toNative(), |
108 | 108 | 'description' => $this->getDescription()->toNative(), |
109 | 109 | 'copyright_holder' => $this->getCopyrightHolder()->toNative(), |
110 | - 'source_location' => (string) $this->getSourceLocation() |
|
110 | + 'source_location' => (string)$this->getSourceLocation() |
|
111 | 111 | ); |
112 | 112 | } |
113 | 113 |
@@ -5,9 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | namespace CultuurNet\UDB3\Event\ReadModel\History; |
7 | 7 | |
8 | -use Broadway\Domain\DateTime; |
|
9 | 8 | use Broadway\Domain\DomainMessage; |
10 | -use Broadway\Domain\Metadata; |
|
11 | 9 | use Broadway\EventHandling\EventListenerInterface; |
12 | 10 | use CultuurNet\UDB3\Cdb\EventItemFactory; |
13 | 11 | use CultuurNet\UDB3\Event\DescriptionTranslated; |
@@ -21,11 +19,8 @@ discard block |
||
21 | 19 | use CultuurNet\UDB3\Event\Events\LabelsMerged; |
22 | 20 | use CultuurNet\UDB3\Event\Events\TranslationDeleted; |
23 | 21 | use CultuurNet\UDB3\Event\Events\LabelDeleted; |
24 | -use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface; |
|
25 | 22 | use CultuurNet\UDB3\Event\TitleTranslated; |
26 | -use CultuurNet\UDB3\EventHandling\DelegateEventHandlingToSpecificMethodTrait; |
|
27 | 23 | use CultuurNet\UDB3\Offer\ReadModel\History\OfferHistoryProjector; |
28 | -use CultuurNet\UDB3\ReadModel\JsonDocument; |
|
29 | 24 | use ValueObjects\String\String; |
30 | 25 | |
31 | 26 | class HistoryProjector extends OfferHistoryProjector implements EventListenerInterface |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $domainMessage->getRecordedOn() |
71 | 71 | ), |
72 | 72 | new String( |
73 | - 'Aangemaakt via EntryAPI door consumer "' . $consumerName . '"' |
|
73 | + 'Aangemaakt via EntryAPI door consumer "'.$consumerName.'"' |
|
74 | 74 | ), |
75 | 75 | $this->getAuthorFromMetadata($domainMessage->getMetadata()) |
76 | 76 | ) |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $domainMessage->getRecordedOn() |
91 | 91 | ), |
92 | 92 | new String( |
93 | - 'Geüpdatet via EntryAPI door consumer "' . $consumerName . '"' |
|
93 | + 'Geüpdatet via EntryAPI door consumer "'.$consumerName.'"' |
|
94 | 94 | ), |
95 | 95 | $this->getAuthorFromMetadata($domainMessage->getMetadata()) |
96 | 96 | ) |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $consumerName = $this->getConsumerFromMetadata($domainMessage->getMetadata()); |
160 | 160 | |
161 | 161 | if ($consumerName) { |
162 | - $message .= ' via EntryAPI door consumer "' . $consumerName . '"'; |
|
162 | + $message .= ' via EntryAPI door consumer "'.$consumerName.'"'; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | $this->writeHistory( |