@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $normalizedData = [ |
50 | 50 | '@id' => $this->iriGenerator->iri($mediaObject->getMediaObjectId()), |
51 | 51 | '@type' => $type, |
52 | - 'contentUrl' => (string) $mediaObject->getSourceLocation(), |
|
53 | - 'thumbnailUrl' => (string) $mediaObject->getSourceLocation(), |
|
54 | - 'description' => (string) $mediaObject->getDescription(), |
|
55 | - 'copyrightHolder' => (string) $mediaObject->getCopyrightHolder(), |
|
56 | - 'inLanguage' => (string) $mediaObject->getLanguage(), |
|
52 | + 'contentUrl' => (string)$mediaObject->getSourceLocation(), |
|
53 | + 'thumbnailUrl' => (string)$mediaObject->getSourceLocation(), |
|
54 | + 'description' => (string)$mediaObject->getDescription(), |
|
55 | + 'copyrightHolder' => (string)$mediaObject->getCopyrightHolder(), |
|
56 | + 'inLanguage' => (string)$mediaObject->getLanguage(), |
|
57 | 57 | ]; |
58 | 58 | |
59 | 59 | return $normalizedData; |
@@ -61,18 +61,18 @@ discard block |
||
61 | 61 | |
62 | 62 | public function serializeMimeType(MIMEType $mimeType) |
63 | 63 | { |
64 | - $typeParts = explode('/', (string) $mimeType); |
|
64 | + $typeParts = explode('/', (string)$mimeType); |
|
65 | 65 | $type = array_shift($typeParts); |
66 | 66 | |
67 | 67 | if ($type === 'image') { |
68 | 68 | return 'schema:ImageObject'; |
69 | 69 | } |
70 | 70 | |
71 | - if ((string) $mimeType === 'application/octet-stream') { |
|
71 | + if ((string)$mimeType === 'application/octet-stream') { |
|
72 | 72 | return 'schema:mediaObject'; |
73 | 73 | } |
74 | 74 | |
75 | - throw new UnsupportedException('Unsupported MIME-type "'. $mimeType .'"'); |
|
75 | + throw new UnsupportedException('Unsupported MIME-type "'.$mimeType.'"'); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | public function deserialize($data, $type, $format, array $context = array()) |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $document = $this->documentRepository->get($cdbid); |
39 | 39 | |
40 | 40 | if (!$document) { |
41 | - throw new EntityNotFoundException('Could not load JSON-LD document for cdbid ' . $cdbid); |
|
41 | + throw new EntityNotFoundException('Could not load JSON-LD document for cdbid '.$cdbid); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $json = $document->getBody(); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'addressCountry' => $address->getCountry(), |
193 | 193 | 'addressLocality' => $address->getCity(), |
194 | 194 | 'postalCode' => $address->getZip(), |
195 | - 'streetAddress' => $address->getStreet() . ' ' . $address->getHouseNumber(), |
|
195 | + 'streetAddress' => $address->getStreet().' '.$address->getHouseNumber(), |
|
196 | 196 | ); |
197 | 197 | } |
198 | 198 | } |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $slug = ''; |
352 | 352 | } |
353 | 353 | |
354 | - $reference = 'http://www.uitinvlaanderen.be/agenda/e/' . $slug . '/' . $event->getCdbId(); |
|
354 | + $reference = 'http://www.uitinvlaanderen.be/agenda/e/'.$slug.'/'.$event->getCdbId(); |
|
355 | 355 | |
356 | 356 | |
357 | 357 | if (!property_exists($jsonLD, 'sameAs')) { |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | */ |
370 | 370 | private function importAudience(\CultureFeed_Cdb_Item_Event $event, \stdClass $jsonLD) |
371 | 371 | { |
372 | - $eventIsPrivate = (bool) $event->isPrivate(); |
|
372 | + $eventIsPrivate = (bool)$event->isPrivate(); |
|
373 | 373 | $eventTargetsEducation = $eventIsPrivate && $event->getCategories()->hasCategory('2.1.3.0.0'); |
374 | 374 | |
375 | 375 | $audienceType = $eventTargetsEducation ? 'education' : ($eventIsPrivate ? 'members' : 'everyone'); |
@@ -62,20 +62,20 @@ |
||
62 | 62 | $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl'; |
63 | 63 | |
64 | 64 | if (isset($body->address->streetAddress)) { |
65 | - $body->address = (object) [ |
|
65 | + $body->address = (object)[ |
|
66 | 66 | $mainLanguage => $body->address, |
67 | 67 | ]; |
68 | 68 | } |
69 | 69 | |
70 | 70 | if (isset($body->bookingInfo->urlLabel) && is_string($body->bookingInfo->urlLabel)) { |
71 | - $body->bookingInfo->urlLabel = (object) [ |
|
71 | + $body->bookingInfo->urlLabel = (object)[ |
|
72 | 72 | $mainLanguage => $body->bookingInfo->urlLabel, |
73 | 73 | ]; |
74 | 74 | } |
75 | 75 | |
76 | 76 | if (isset($body->priceInfo) && is_array($body->priceInfo) && is_string($body->priceInfo[0]->name)) { |
77 | 77 | foreach ($body->priceInfo as $priceInfo) { |
78 | - $priceInfo->name = (object) [ |
|
78 | + $priceInfo->name = (object)[ |
|
79 | 79 | $mainLanguage => $priceInfo->name, |
80 | 80 | ]; |
81 | 81 | } |
@@ -61,14 +61,14 @@ |
||
61 | 61 | $mainLanguage = isset($body->mainLanguage) ? $body->mainLanguage : 'nl'; |
62 | 62 | |
63 | 63 | if (isset($body->bookingInfo->urlLabel) && is_string($body->bookingInfo->urlLabel)) { |
64 | - $body->bookingInfo->urlLabel = (object) [ |
|
64 | + $body->bookingInfo->urlLabel = (object)[ |
|
65 | 65 | $mainLanguage => $body->bookingInfo->urlLabel, |
66 | 66 | ]; |
67 | 67 | } |
68 | 68 | |
69 | 69 | if (isset($body->priceInfo) && is_array($body->priceInfo) && is_string($body->priceInfo[0]->name)) { |
70 | 70 | foreach ($body->priceInfo as $priceInfo) { |
71 | - $priceInfo->name = (object) [ |
|
71 | + $priceInfo->name = (object)[ |
|
72 | 72 | $mainLanguage => $priceInfo->name, |
73 | 73 | ]; |
74 | 74 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function getByUuid(UUID $uuid) |
55 | 55 | { |
56 | 56 | $aliases = $this->getAliases(); |
57 | - $whereId = SchemaConfigurator::UUID_COLUMN . ' = ?'; |
|
57 | + $whereId = SchemaConfigurator::UUID_COLUMN.' = ?'; |
|
58 | 58 | |
59 | 59 | $queryBuilder = $this->createQueryBuilder()->select($aliases) |
60 | 60 | ->from($this->getTableName()->toNative()) |
@@ -215,15 +215,15 @@ discard block |
||
215 | 215 | private function createUserLabelsSubQuery(Query $query) |
216 | 216 | { |
217 | 217 | return $this->createQueryBuilder() |
218 | - ->select('DISTINCT ' . LabelRolesSchemaConfigurator::LABEL_ID_COLUMN) |
|
218 | + ->select('DISTINCT '.LabelRolesSchemaConfigurator::LABEL_ID_COLUMN) |
|
219 | 219 | ->from($this->userRolesTableName->toNative(), 'ur') |
220 | 220 | ->innerJoin( |
221 | 221 | 'ur', |
222 | 222 | $this->labelRolesTableName->toNative(), |
223 | 223 | 'lr', |
224 | - 'ur.' . PermissionsSchemaConfigurator::ROLE_ID_COLUMN . ' = lr.' . LabelRolesSchemaConfigurator::ROLE_ID_COLUMN |
|
224 | + 'ur.'.PermissionsSchemaConfigurator::ROLE_ID_COLUMN.' = lr.'.LabelRolesSchemaConfigurator::ROLE_ID_COLUMN |
|
225 | 225 | ) |
226 | - ->where('ur.' . PermissionsSchemaConfigurator::USER_ID_COLUMN . '= :' . PermissionsSchemaConfigurator::USER_ID_COLUMN); |
|
226 | + ->where('ur.'.PermissionsSchemaConfigurator::USER_ID_COLUMN.'= :'.PermissionsSchemaConfigurator::USER_ID_COLUMN); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | /** |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | { |
250 | 250 | return $queryBuilder->expr()->like( |
251 | 251 | SchemaConfigurator::NAME_COLUMN, |
252 | - ':' . SchemaConfigurator::NAME_COLUMN |
|
252 | + ':'.SchemaConfigurator::NAME_COLUMN |
|
253 | 253 | ); |
254 | 254 | } |
255 | 255 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | private function createLikeParameter(Query $query) |
261 | 261 | { |
262 | - return '%' . $query->getValue()->toNative() . '%'; |
|
262 | + return '%'.$query->getValue()->toNative().'%'; |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public function toCdbCalendar(CalendarInterface $calendar) |
41 | 41 | { |
42 | 42 | $weekScheme = $this->getWeekScheme($calendar); |
43 | - $calendarType = (string) $calendar->getType(); |
|
43 | + $calendarType = (string)$calendar->getType(); |
|
44 | 44 | |
45 | 45 | switch ($calendarType) { |
46 | 46 | case CalendarType::MULTIPLE: |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | private function countTimestamps(CultureFeed_Cdb_Data_Calendar_TimestampList $timestamps) |
101 | 101 | { |
102 | - $numberOfTimestamps = iterator_count($timestamps); |
|
102 | + $numberOfTimestamps = iterator_count($timestamps); |
|
103 | 103 | $timestamps->rewind(); |
104 | 104 | |
105 | 105 | return $numberOfTimestamps; |
@@ -133,12 +133,12 @@ discard block |
||
133 | 133 | foreach ($openingHours as $openingHour) { |
134 | 134 | // In CDB2 every day needs to be a seperate entry. |
135 | 135 | if (is_array($openingHour)) { |
136 | - $openingHour = (object) $openingHour; |
|
136 | + $openingHour = (object)$openingHour; |
|
137 | 137 | } |
138 | 138 | foreach ($openingHour->getDayOfWeekCollection()->getDaysOfWeek() as $day) { |
139 | 139 | $openingTimesPerDay[$day->toNative()][] = new CultureFeed_Cdb_Data_Calendar_OpeningTime( |
140 | - $openingHour->getOpens()->toNativeString() . ':00', |
|
141 | - $openingHour->getCloses()->toNativeString() . ':00' |
|
140 | + $openingHour->getOpens()->toNativeString().':00', |
|
141 | + $openingHour->getCloses()->toNativeString().':00' |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | } else { |
222 | 222 | $days = iterator_to_array($period->getDatePeriod('1 DAY')); |
223 | 223 | $fillerTimestamps = array_map( |
224 | - function (DateTimeInterface $dateTime) use ($index) { |
|
224 | + function(DateTimeInterface $dateTime) use ($index) { |
|
225 | 225 | return new CultureFeed_Cdb_Data_Calendar_Timestamp( |
226 | 226 | $dateTime->format('Y-m-d'), |
227 | 227 | $this->createIndexedTimeString($index) |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | $newCalendar = array_reduce( |
235 | 235 | array_merge([$startTimestamp], $fillerTimestamps, [$endTimestamp]), |
236 | - function (CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
236 | + function(CultureFeed_Cdb_Data_Calendar_TimestampList $calendar, $timestamp) { |
|
237 | 237 | $calendar->add($timestamp); |
238 | 238 | return $calendar; |
239 | 239 | }, |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | $time = is_int($index) |
259 | - ? $timestamp->format('H:i') . ':' . str_pad((string) $index, 2, '0', STR_PAD_LEFT) |
|
259 | + ? $timestamp->format('H:i').':'.str_pad((string)$index, 2, '0', STR_PAD_LEFT) |
|
260 | 260 | : $timestamp->format('H:i:s'); |
261 | 261 | |
262 | 262 | return $time; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | private function createIndexedTimeString($index) |
270 | 270 | { |
271 | - return '00:00:' . str_pad((string) $index, 2, '0', STR_PAD_LEFT); |
|
271 | + return '00:00:'.str_pad((string)$index, 2, '0', STR_PAD_LEFT); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | public function removeOrganizer($eventId) |
43 | 43 | { |
44 | - $transaction = function ($connection) use ($eventId) { |
|
44 | + $transaction = function($connection) use ($eventId) { |
|
45 | 45 | if ($this->eventHasRelations($connection, $eventId)) { |
46 | 46 | $this->updateEventRelation($connection, $eventId, 'organizer', null); |
47 | 47 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | private function storeRelation($eventId, $relationType, $itemId) |
69 | 69 | { |
70 | - $transaction = function ($connection) use ($eventId, $relationType, $itemId) { |
|
70 | + $transaction = function($connection) use ($eventId, $relationType, $itemId) { |
|
71 | 71 | if ($this->eventHasRelations($connection, $eventId)) { |
72 | 72 | $this->updateEventRelation($connection, $eventId, $relationType, $itemId); |
73 | 73 | } else { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->connection->exec($sql); |
43 | 43 | |
44 | 44 | if ($platform instanceof SqlitePlatform) { |
45 | - $sql = 'UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME=' . $this->connection->quoteIdentifier($this->tableName); |
|
45 | + $sql = 'UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='.$this->connection->quoteIdentifier($this->tableName); |
|
46 | 46 | $this->connection->exec($sql); |
47 | 47 | } |
48 | 48 | } |