@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | */ |
327 | 327 | protected function registerCoreProvider($class, $mimeType, $options = []) { |
328 | 328 | if (in_array(trim($class, '\\'), $this->getEnabledDefaultProvider())) { |
329 | - $this->registerProvider($mimeType, function () use ($class, $options) { |
|
329 | + $this->registerProvider($mimeType, function() use ($class, $options) { |
|
330 | 330 | return new $class($options); |
331 | 331 | }); |
332 | 332 | } |
@@ -425,14 +425,14 @@ discard block |
||
425 | 425 | |
426 | 426 | $providers = $context->getPreviewProviders(); |
427 | 427 | foreach ($providers as $provider) { |
428 | - $key = $provider->getMimeTypeRegex() . '-' . $provider->getService(); |
|
428 | + $key = $provider->getMimeTypeRegex().'-'.$provider->getService(); |
|
429 | 429 | if (array_key_exists($key, $this->loadedBootstrapProviders)) { |
430 | 430 | // Do not load the provider more than once |
431 | 431 | continue; |
432 | 432 | } |
433 | 433 | $this->loadedBootstrapProviders[$key] = null; |
434 | 434 | |
435 | - $this->registerProvider($provider->getMimeTypeRegex(), function () use ($provider) { |
|
435 | + $this->registerProvider($provider->getMimeTypeRegex(), function() use ($provider) { |
|
436 | 436 | try { |
437 | 437 | return $this->container->get($provider->getService()); |
438 | 438 | } catch (QueryException $e) { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | $documentationUrl = $this->urlGenerator->getAbsoluteURL( |
82 | - $this->urlGenerator->linkTo('', 'core/doc/' . $mode . '/index.html') |
|
82 | + $this->urlGenerator->linkTo('', 'core/doc/'.$mode.'/index.html') |
|
83 | 83 | ); |
84 | 84 | |
85 | 85 | $urlUserDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'user']); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public static function getDavFileId(int $id): string { |
48 | 48 | $instanceId = \OC_Util::getInstanceId(); |
49 | 49 | $id = sprintf('%08d', $id); |
50 | - return $id . $instanceId; |
|
50 | + return $id.$instanceId; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -133,9 +133,9 @@ |
||
133 | 133 | */ |
134 | 134 | public function alphaBlending(float $opacity, Color $source): Color { |
135 | 135 | return new Color( |
136 | - (int)((1 - $opacity) * $source->red() + $opacity * $this->red()), |
|
137 | - (int)((1 - $opacity) * $source->green() + $opacity * $this->green()), |
|
138 | - (int)((1 - $opacity) * $source->blue() + $opacity * $this->blue()) |
|
136 | + (int) ((1 - $opacity) * $source->red() + $opacity * $this->red()), |
|
137 | + (int) ((1 - $opacity) * $source->green() + $opacity * $this->green()), |
|
138 | + (int) ((1 - $opacity) * $source->blue() + $opacity * $this->blue()) |
|
139 | 139 | ); |
140 | 140 | } |
141 | 141 |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | $ext = 'png'; |
113 | 113 | |
114 | 114 | if ($size === -1) { |
115 | - $path = 'avatar-placeholder' . ($darkTheme ? '-dark' : '') . '.' . $ext; |
|
115 | + $path = 'avatar-placeholder'.($darkTheme ? '-dark' : '').'.'.$ext; |
|
116 | 116 | } else { |
117 | - $path = 'avatar-placeholder' . ($darkTheme ? '-dark' : '') . '.' . $size . '.' . $ext; |
|
117 | + $path = 'avatar-placeholder'.($darkTheme ? '-dark' : '').'.'.$size.'.'.$ext; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | try { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $file = $this->folder->newFile($path); |
133 | 133 | $file->putContent($data); |
134 | 134 | } catch (NotPermittedException $e) { |
135 | - $this->logger->error('Failed to save avatar placeholder for ' . $this->user->getUID()); |
|
135 | + $this->logger->error('Failed to save avatar placeholder for '.$this->user->getUID()); |
|
136 | 136 | throw new NotFoundException(); |
137 | 137 | } |
138 | 138 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | */ |
235 | 235 | private function getGroups(IUser $user): array { |
236 | 236 | $groups = array_map( |
237 | - static function (IGroup $group) { |
|
237 | + static function(IGroup $group) { |
|
238 | 238 | return $group->getDisplayName(); |
239 | 239 | }, |
240 | 240 | $this->groupManager->getUserGroups($user) |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | ]; |
258 | 258 | |
259 | 259 | $additionalEmails = array_map( |
260 | - function (IAccountProperty $property) { |
|
260 | + function(IAccountProperty $property) { |
|
261 | 261 | return [ |
262 | 262 | 'name' => $property->getName(), |
263 | 263 | 'value' => $property->getValue(), |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $emailMap = [ |
273 | 273 | 'primaryEmail' => $systemEmail, |
274 | 274 | 'additionalEmails' => $additionalEmails, |
275 | - 'notificationEmail' => (string)$account->getUser()->getPrimaryEMailAddress(), |
|
275 | + 'notificationEmail' => (string) $account->getUser()->getPrimaryEMailAddress(), |
|
276 | 276 | ]; |
277 | 277 | |
278 | 278 | return $emailMap; |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | default: |
367 | 367 | $message = $this->l->t('Verify'); |
368 | 368 | } |
369 | - $messageParameters[$property . 'Message'] = $message; |
|
369 | + $messageParameters[$property.'Message'] = $message; |
|
370 | 370 | } |
371 | 371 | return $messageParameters; |
372 | 372 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | // no avatar to remove |
58 | 58 | } catch (\Exception $e) { |
59 | 59 | // Ignore exceptions |
60 | - $this->logger->info('Could not cleanup avatar of ' . $user->getUID(), [ |
|
60 | + $this->logger->info('Could not cleanup avatar of '.$user->getUID(), [ |
|
61 | 61 | 'exception' => $e, |
62 | 62 | ]); |
63 | 63 | } |
@@ -123,7 +123,7 @@ |
||
123 | 123 | return; |
124 | 124 | } |
125 | 125 | |
126 | - $tagsIds = array_map(fn (array $row) => (int)$row['id'], $result->fetchAll()); |
|
126 | + $tagsIds = array_map(fn (array $row) => (int) $row['id'], $result->fetchAll()); |
|
127 | 127 | $result->closeCursor(); |
128 | 128 | |
129 | 129 | if (count($tagsIds) === 0) { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - $this->logger->error('Giving up after ' . self::TOKEN_RETRIES . ' retries to generate a unique local editor token for path hash: ' . $pathHash); |
|
103 | + $this->logger->error('Giving up after '.self::TOKEN_RETRIES.' retries to generate a unique local editor token for path hash: '.$pathHash); |
|
104 | 104 | return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
105 | 105 | } |
106 | 106 |