@@ -8,7 +8,7 @@ |
||
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) |
@@ -2,8 +2,6 @@ |
||
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 |
@@ -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, |
@@ -86,7 +86,7 @@ |
||
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 | ); |
@@ -268,15 +268,15 @@ |
||
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'); |
@@ -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') { |