@@ -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 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | ); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - return isset($userId) ? (string) $userId : ''; |
|
| 38 | + return isset($userId) ? (string)$userId : ''; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function getCreationDateTime(): ?DateTimeImmutable |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | { |
| 103 | 103 | $this->updateJSONLD( |
| 104 | 104 | $eventId, |
| 105 | - function ($eventLd) use ($organizerJSONLD) { |
|
| 105 | + function($eventLd) use ($organizerJSONLD) { |
|
| 106 | 106 | $eventLd->organizer = $organizerJSONLD; |
| 107 | 107 | } |
| 108 | 108 | ); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | $this->updateJSONLD( |
| 114 | 114 | $eventId, |
| 115 | - function ($eventLd) use ($placeJSONLD) { |
|
| 115 | + function($eventLd) use ($placeJSONLD) { |
|
| 116 | 116 | $eventLd->location = $placeJSONLD; |
| 117 | 117 | } |
| 118 | 118 | ); |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | ) |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - $message = new DomainMessage( |
|
| 91 | + $message = new DomainMessage( |
|
| 92 | 92 | $this->id ?? UUID::generateAsString(), |
| 93 | 93 | $this->playhead ?? 1, |
| 94 | 94 | $finalMetaData, |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return $createdByIdentifier; |
| 43 | 43 | } catch (InvalidNativeArgumentException $exception) { |
| 44 | 44 | $this->logger->info( |
| 45 | - 'The provided createdByIdentifier ' . $createdByIdentifier->toNative() . ' is not a UUID.', |
|
| 45 | + 'The provided createdByIdentifier '.$createdByIdentifier->toNative().' is not a UUID.', |
|
| 46 | 46 | [ |
| 47 | 47 | 'exception' => $exception, |
| 48 | 48 | ] |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if (!$userId) { |
| 56 | 56 | $this->logger->warning( |
| 57 | - 'Unable to find user with identifier ' . $createdByIdentifier |
|
| 57 | + 'Unable to find user with identifier '.$createdByIdentifier |
|
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | } catch (Exception $e) { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $name = new StringLiteral($savedSearch->name); |
| 75 | 75 | $query = QueryString::fromURLQueryString($savedSearch->query); |
| 76 | - $id = new StringLiteral((string) $savedSearch->id); |
|
| 76 | + $id = new StringLiteral((string)$savedSearch->id); |
|
| 77 | 77 | |
| 78 | 78 | return new SavedSearch($name, $query, $id); |
| 79 | 79 | } |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function write(StringLiteral $userId, StringLiteral $name, QueryString $queryString): void |
| 85 | 85 | { |
| 86 | - $userId = (string) $userId; |
|
| 87 | - $name = (string) $name; |
|
| 86 | + $userId = (string)$userId; |
|
| 87 | + $name = (string)$name; |
|
| 88 | 88 | $query = $queryString->toURLQueryString(); |
| 89 | 89 | |
| 90 | 90 | $savedSearch = new \CultureFeed_SavedSearches_SavedSearch( |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | 'error' => $exception->getMessage(), |
| 105 | 105 | 'userId' => $userId, |
| 106 | 106 | 'name' => $name, |
| 107 | - 'query' => (string) $queryString, |
|
| 107 | + 'query' => (string)$queryString, |
|
| 108 | 108 | ] |
| 109 | 109 | ); |
| 110 | 110 | } |
@@ -116,8 +116,8 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function delete(StringLiteral $userId, StringLiteral $searchId): void |
| 118 | 118 | { |
| 119 | - $userId = (string) $userId; |
|
| 120 | - $searchId = (string) $searchId; |
|
| 119 | + $userId = (string)$userId; |
|
| 120 | + $searchId = (string)$searchId; |
|
| 121 | 121 | |
| 122 | 122 | try { |
| 123 | 123 | $this->savedSearches->unsubscribe($searchId, $userId); |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | ): void { |
| 91 | 91 | $queryBuilder = $this->connection->createQueryBuilder() |
| 92 | 92 | ->delete($this->tableName->toNative()) |
| 93 | - ->where(SchemaConfigurator::USER . ' = ?') |
|
| 94 | - ->andWhere(SchemaConfigurator::ID . ' = ?') |
|
| 93 | + ->where(SchemaConfigurator::USER.' = ?') |
|
| 94 | + ->andWhere(SchemaConfigurator::ID.' = ?') |
|
| 95 | 95 | ->setParameters( |
| 96 | 96 | [ |
| 97 | 97 | $userId->toNative(), |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $queryBuilder = $this->connection->createQueryBuilder() |
| 111 | 111 | ->select('*') |
| 112 | 112 | ->from($this->tableName->toNative()) |
| 113 | - ->where(SchemaConfigurator::USER . ' = ?') |
|
| 113 | + ->where(SchemaConfigurator::USER.' = ?') |
|
| 114 | 114 | ->setParameters( |
| 115 | 115 | [ |
| 116 | 116 | $this->userId->toNative(), |