@@ -6,8 +6,8 @@ |
||
| 6 | 6 | ?> |
| 7 | 7 | <div class="guest-box"> |
| 8 | 8 | <div class="notecard error"> |
| 9 | - <p><?php p($l->t('There was an error updating your attendance status.'));?></p> |
|
| 10 | - <p><?php p($l->t('Please contact the organizer directly.'));?></p> |
|
| 9 | + <p><?php p($l->t('There was an error updating your attendance status.')); ?></p> |
|
| 10 | + <p><?php p($l->t('Please contact the organizer directly.')); ?></p> |
|
| 11 | 11 | <?php if (isset($_['organizer'])): ?> |
| 12 | 12 | <p><a href="<?php p($_['organizer']) ?>"><?php p(substr($_['organizer'], 7)) ?></a></p> |
| 13 | 13 | <?php endif; ?> |
@@ -263,10 +263,10 @@ discard block |
||
| 263 | 263 | ]); |
| 264 | 264 | |
| 265 | 265 | return $localeStart |
| 266 | - . ' (' . $startTimezone . ') ' |
|
| 266 | + . ' ('.$startTimezone.') ' |
|
| 267 | 267 | . ' - ' |
| 268 | 268 | . $localeEnd |
| 269 | - . ' (' . $endTimezone . ')'; |
|
| 269 | + . ' ('.$endTimezone.')'; |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | // Show only the time if the day is the same |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | return $localeStart |
| 281 | 281 | . ' - ' |
| 282 | 282 | . $localeEnd |
| 283 | - . ' (' . $startTimezone . ')'; |
|
| 283 | + . ' ('.$startTimezone.')'; |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | * @return string |
| 299 | 299 | */ |
| 300 | 300 | private function getWeekDayName(DateTime $dt):string { |
| 301 | - return (string)$this->l10n->l('weekdayName', $dt, ['width' => 'abbreviated']); |
|
| 301 | + return (string) $this->l10n->l('weekdayName', $dt, ['width' => 'abbreviated']); |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * @return string |
| 307 | 307 | */ |
| 308 | 308 | private function getDateString(DateTime $dt):string { |
| 309 | - return (string)$this->l10n->l('date', $dt, ['width' => 'medium']); |
|
| 309 | + return (string) $this->l10n->l('date', $dt, ['width' => 'medium']); |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | /** |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | * @return string |
| 315 | 315 | */ |
| 316 | 316 | private function getDateTimeString(DateTime $dt):string { |
| 317 | - return (string)$this->l10n->l('datetime', $dt, ['width' => 'medium|short']); |
|
| 317 | + return (string) $this->l10n->l('datetime', $dt, ['width' => 'medium|short']); |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | /** |
@@ -322,6 +322,6 @@ discard block |
||
| 322 | 322 | * @return string |
| 323 | 323 | */ |
| 324 | 324 | private function getTimeString(DateTime $dt):string { |
| 325 | - return (string)$this->l10n->l('time', $dt, ['width' => 'short']); |
|
| 325 | + return (string) $this->l10n->l('time', $dt, ['width' => 'short']); |
|
| 326 | 326 | } |
| 327 | 327 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | ); |
| 71 | 71 | } catch (Throwable $e) { |
| 72 | 72 | // Any error with activities shouldn't abort the calendar creation, so we just log it |
| 73 | - $this->logger->error('Error generating activities for a new calendar: ' . $e->getMessage(), [ |
|
| 73 | + $this->logger->error('Error generating activities for a new calendar: '.$e->getMessage(), [ |
|
| 74 | 74 | 'exception' => $e, |
| 75 | 75 | ]); |
| 76 | 76 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | ); |
| 88 | 88 | } catch (Throwable $e) { |
| 89 | 89 | // Any error with activities shouldn't abort the calendar update, so we just log it |
| 90 | - $this->logger->error('Error generating activities for changed calendar: ' . $e->getMessage(), [ |
|
| 90 | + $this->logger->error('Error generating activities for changed calendar: '.$e->getMessage(), [ |
|
| 91 | 91 | 'exception' => $e, |
| 92 | 92 | ]); |
| 93 | 93 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | ); |
| 104 | 104 | } catch (Throwable $e) { |
| 105 | 105 | // Any error with activities shouldn't abort the calendar update, so we just log it |
| 106 | - $this->logger->error('Error generating activities for changed calendar: ' . $e->getMessage(), [ |
|
| 106 | + $this->logger->error('Error generating activities for changed calendar: '.$e->getMessage(), [ |
|
| 107 | 107 | 'exception' => $e, |
| 108 | 108 | ]); |
| 109 | 109 | } |
@@ -119,13 +119,13 @@ discard block |
||
| 119 | 119 | ); |
| 120 | 120 | } catch (Throwable $e) { |
| 121 | 121 | // Any error with activities shouldn't abort the calendar update, so we just log it |
| 122 | - $this->logger->error('Error generating activities for changed calendar: ' . $e->getMessage(), [ |
|
| 122 | + $this->logger->error('Error generating activities for changed calendar: '.$e->getMessage(), [ |
|
| 123 | 123 | 'exception' => $e, |
| 124 | 124 | ]); |
| 125 | 125 | } |
| 126 | 126 | } elseif ($event instanceof CalendarDeletedEvent) { |
| 127 | 127 | try { |
| 128 | - $deletedProp = '{' . Plugin::NS_NEXTCLOUD . '}deleted-at'; |
|
| 128 | + $deletedProp = '{'.Plugin::NS_NEXTCLOUD.'}deleted-at'; |
|
| 129 | 129 | if (isset($event->getCalendarData()[$deletedProp])) { |
| 130 | 130 | $this->logger->debug( |
| 131 | 131 | sprintf('Calendar %d was already in trashbin, skipping deletion activity', $event->getCalendarId()) |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | } catch (Throwable $e) { |
| 144 | 144 | // Any error with activities shouldn't abort the calendar deletion, so we just log it |
| 145 | - $this->logger->error('Error generating activities for a deleted calendar: ' . $e->getMessage(), [ |
|
| 145 | + $this->logger->error('Error generating activities for a deleted calendar: '.$e->getMessage(), [ |
|
| 146 | 146 | 'exception' => $e, |
| 147 | 147 | ]); |
| 148 | 148 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ); |
| 161 | 161 | } catch (Throwable $e) { |
| 162 | 162 | // Any error with activities shouldn't abort the calendar object creation, so we just log it |
| 163 | - $this->logger->error('Error generating activity for a new calendar object: ' . $e->getMessage(), [ |
|
| 163 | + $this->logger->error('Error generating activity for a new calendar object: '.$e->getMessage(), [ |
|
| 164 | 164 | 'exception' => $e, |
| 165 | 165 | ]); |
| 166 | 166 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | ); |
| 179 | 179 | } catch (Throwable $e) { |
| 180 | 180 | // Any error with activities shouldn't abort the calendar deletion, so we just log it |
| 181 | - $this->logger->error('Error generating activity for a deleted calendar object: ' . $e->getMessage(), [ |
|
| 181 | + $this->logger->error('Error generating activity for a deleted calendar object: '.$e->getMessage(), [ |
|
| 182 | 182 | 'exception' => $e, |
| 183 | 183 | ]); |
| 184 | 184 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | ); |
| 198 | 198 | } catch (Throwable $e) { |
| 199 | 199 | // Any error with activities shouldn't abort the calendar deletion, so we just log it |
| 200 | - $this->logger->error('Error generating activity for a deleted calendar object: ' . $e->getMessage(), [ |
|
| 200 | + $this->logger->error('Error generating activity for a deleted calendar object: '.$e->getMessage(), [ |
|
| 201 | 201 | 'exception' => $e, |
| 202 | 202 | ]); |
| 203 | 203 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | ); |
| 216 | 216 | } catch (Throwable $e) { |
| 217 | 217 | // Any error with activities shouldn't abort the calendar object creation, so we just log it |
| 218 | - $this->logger->error('Error generating activity for a new calendar object: ' . $e->getMessage(), [ |
|
| 218 | + $this->logger->error('Error generating activity for a new calendar object: '.$e->getMessage(), [ |
|
| 219 | 219 | 'exception' => $e, |
| 220 | 220 | ]); |
| 221 | 221 | } |
@@ -233,13 +233,13 @@ discard block |
||
| 233 | 233 | ); |
| 234 | 234 | } catch (Throwable $e) { |
| 235 | 235 | // Any error with activities shouldn't abort the calendar object restoration, so we just log it |
| 236 | - $this->logger->error('Error generating activity for a restored calendar object: ' . $e->getMessage(), [ |
|
| 236 | + $this->logger->error('Error generating activity for a restored calendar object: '.$e->getMessage(), [ |
|
| 237 | 237 | 'exception' => $e, |
| 238 | 238 | ]); |
| 239 | 239 | } |
| 240 | 240 | } elseif ($event instanceof CalendarObjectDeletedEvent) { |
| 241 | 241 | try { |
| 242 | - $deletedProp = '{' . Plugin::NS_NEXTCLOUD . '}deleted-at'; |
|
| 242 | + $deletedProp = '{'.Plugin::NS_NEXTCLOUD.'}deleted-at'; |
|
| 243 | 243 | if (isset($event->getObjectData()[$deletedProp])) { |
| 244 | 244 | $this->logger->debug( |
| 245 | 245 | sprintf('Calendar object in calendar %d was already in trashbin, skipping deletion activity', $event->getCalendarId()) |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | } |
| 259 | 259 | } catch (Throwable $e) { |
| 260 | 260 | // Any error with activities shouldn't abort the calendar deletion, so we just log it |
| 261 | - $this->logger->error('Error generating activity for a deleted calendar object: ' . $e->getMessage(), [ |
|
| 261 | + $this->logger->error('Error generating activity for a deleted calendar object: '.$e->getMessage(), [ |
|
| 262 | 262 | 'exception' => $e, |
| 263 | 263 | ]); |
| 264 | 264 | } |
@@ -57,13 +57,13 @@ discard block |
||
| 57 | 57 | $subscriptionId = $event->getSubscriptionId(); |
| 58 | 58 | $subscriptionData = $event->getSubscriptionData(); |
| 59 | 59 | |
| 60 | - $this->logger->debug('Refreshing webcal data for subscription ' . $subscriptionId); |
|
| 60 | + $this->logger->debug('Refreshing webcal data for subscription '.$subscriptionId); |
|
| 61 | 61 | $this->refreshWebcalService->refreshSubscription( |
| 62 | - (string)$subscriptionData['principaluri'], |
|
| 63 | - (string)$subscriptionData['uri'] |
|
| 62 | + (string) $subscriptionData['principaluri'], |
|
| 63 | + (string) $subscriptionData['uri'] |
|
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | - $this->logger->debug('Scheduling webcal data refreshment for subscription ' . $subscriptionId); |
|
| 66 | + $this->logger->debug('Scheduling webcal data refreshment for subscription '.$subscriptionId); |
|
| 67 | 67 | $this->jobList->add(RefreshWebcalJob::class, [ |
| 68 | 68 | 'principaluri' => $subscriptionData['principaluri'], |
| 69 | 69 | 'uri' => $subscriptionData['uri'] |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | $subscriptionId = $event->getSubscriptionId(); |
| 73 | 73 | $subscriptionData = $event->getSubscriptionData(); |
| 74 | 74 | |
| 75 | - $this->logger->debug('Removing refresh webcal job for subscription ' . $subscriptionId); |
|
| 75 | + $this->logger->debug('Removing refresh webcal job for subscription '.$subscriptionId); |
|
| 76 | 76 | $this->jobList->remove(RefreshWebcalJob::class, [ |
| 77 | 77 | 'principaluri' => $subscriptionData['principaluri'], |
| 78 | 78 | 'uri' => $subscriptionData['uri'] |
| 79 | 79 | ]); |
| 80 | 80 | |
| 81 | - $this->logger->debug('Cleaning all reminders for subscription ' . $subscriptionId); |
|
| 81 | + $this->logger->debug('Cleaning all reminders for subscription '.$subscriptionId); |
|
| 82 | 82 | $this->reminderBackend->cleanRemindersForCalendar($subscriptionId); |
| 83 | 83 | } |
| 84 | 84 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | </p> |
| 38 | 38 | <p class="info"> |
| 39 | 39 | <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [ |
| 40 | - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 40 | + '<strong>'.\OCP\Util::sanitizeHTML($_['client']).'</strong>', |
|
| 41 | 41 | \OCP\Util::sanitizeHTML($_['instanceName']) |
| 42 | 42 | ])) ?> |
| 43 | 43 | </p> |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $architecture = function_exists('php_uname') ? php_uname('m') : null; |
| 43 | 43 | if (isset($architecture) && PHP_OS_FAMILY === 'Linux' && in_array($architecture, ['x86_64', 'aarch64'])) { |
| 44 | 44 | $hubApps[] = 'richdocuments'; |
| 45 | - $hubApps[] = 'richdocumentscode' . ($architecture === 'aarch64' ? '_arm64' : ''); |
|
| 45 | + $hubApps[] = 'richdocumentscode'.($architecture === 'aarch64' ? '_arm64' : ''); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | return $hubApps; |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | |
| 372 | 372 | public function searchUsers(string $property, array $values): array { |
| 373 | 373 | // the value col is limited to 255 bytes. It is used for searches only. |
| 374 | - $values = array_map(function (string $value) { |
|
| 374 | + $values = array_map(function(string $value) { |
|
| 375 | 375 | return Util::shortenMultibyteString($value, 255); |
| 376 | 376 | }, $values); |
| 377 | 377 | $chunks = array_chunk($values, 500); |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | protected function sendEmailVerificationEmail(IUser $user, string $email): bool { |
| 452 | 452 | $ref = \substr(hash('sha256', $email), 0, 8); |
| 453 | 453 | $key = $this->crypto->encrypt($email); |
| 454 | - $token = $this->verificationToken->create($user, 'verifyMail' . $ref, $email); |
|
| 454 | + $token = $this->verificationToken->create($user, 'verifyMail'.$ref, $email); |
|
| 455 | 455 | |
| 456 | 456 | $link = $this->urlGenerator->linkToRouteAbsolute( |
| 457 | 457 | 'provisioning_api.Verification.verifyMail', |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | * build default user record in case not data set exists yet |
| 670 | 670 | */ |
| 671 | 671 | protected function buildDefaultUserRecord(IUser $user): array { |
| 672 | - $scopes = array_merge(self::DEFAULT_SCOPES, array_filter($this->config->getSystemValue('account_manager.default_property_scope', []), static function (string $scope, string $property) { |
|
| 672 | + $scopes = array_merge(self::DEFAULT_SCOPES, array_filter($this->config->getSystemValue('account_manager.default_property_scope', []), static function(string $scope, string $property) { |
|
| 673 | 673 | return in_array($property, self::ALLOWED_PROPERTIES, true) && in_array($scope, self::ALLOWED_SCOPES, true); |
| 674 | 674 | }, ARRAY_FILTER_USE_BOTH)); |
| 675 | 675 | |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function isLoggingActivated(): bool { |
| 63 | - $systemValue = (bool)$this->config->getValue('diagnostics.logging', false) |
|
| 64 | - || (bool)$this->config->getValue('profiler', false); |
|
| 63 | + $systemValue = (bool) $this->config->getValue('diagnostics.logging', false) |
|
| 64 | + || (bool) $this->config->getValue('profiler', false); |
|
| 65 | 65 | |
| 66 | 66 | if ($systemValue && $this->config->getValue('debug', false)) { |
| 67 | 67 | return true; |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | $duration = $event->getDuration(); |
| 126 | 126 | $timeInMs = round($duration * 1000, 4); |
| 127 | 127 | |
| 128 | - $loggingMinimum = (int)$this->config->getValue('diagnostics.logging.threshold', 0); |
|
| 128 | + $loggingMinimum = (int) $this->config->getValue('diagnostics.logging.threshold', 0); |
|
| 129 | 129 | if ($loggingMinimum === 0 || $timeInMs < $loggingMinimum) { |
| 130 | 130 | return; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - $message = microtime() . ' - ' . $event->getId() . ': ' . $timeInMs . ' (' . $event->getDescription() . ')'; |
|
| 133 | + $message = microtime().' - '.$event->getId().': '.$timeInMs.' ('.$event->getDescription().')'; |
|
| 134 | 134 | $this->logger->debug($message, ['app' => 'diagnostics']); |
| 135 | 135 | } |
| 136 | 136 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | public function getDirectoryListing(): array { |
| 53 | 53 | $listing = $this->folder->getDirectoryListing(); |
| 54 | 54 | |
| 55 | - $fileListing = array_map(function (Node $file) { |
|
| 55 | + $fileListing = array_map(function(Node $file) { |
|
| 56 | 56 | if ($file instanceof File) { |
| 57 | 57 | return new SimpleFile($file); |
| 58 | 58 | } |