@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <?php foreach ($_['forms']['personal'] as $form) { |
21 | 21 | if (isset($form['anchor'])) { |
22 | 22 | $anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]); |
23 | - $class = 'nav-icon-' . $form['anchor']; |
|
23 | + $class = 'nav-icon-'.$form['anchor']; |
|
24 | 24 | $sectionName = $form['section-name']; ?> |
25 | 25 | <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="personal"> |
26 | 26 | <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | <?php foreach ($_['forms']['admin'] as $form) { |
48 | 48 | if (isset($form['anchor'])) { |
49 | 49 | $anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]); |
50 | - $class = 'nav-icon-' . $form['anchor']; |
|
50 | + $class = 'nav-icon-'.$form['anchor']; |
|
51 | 51 | $sectionName = $form['section-name']; ?> |
52 | 52 | <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="admin"> |
53 | 53 | <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>> |
@@ -11,6 +11,6 @@ |
||
11 | 11 | |
12 | 12 | <?php foreach ($_['forms'] as $form) { |
13 | 13 | if (isset($form['form'])) {?> |
14 | - <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> |
|
14 | + <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div> |
|
15 | 15 | <?php } |
16 | 16 | } ?> |
@@ -53,7 +53,7 @@ |
||
53 | 53 | continue; |
54 | 54 | } |
55 | 55 | |
56 | - if (str_starts_with($query->getRoute(), $entry['id'] . '.')) { |
|
56 | + if (str_starts_with($query->getRoute(), $entry['id'].'.')) { |
|
57 | 57 | // Skip the current app, unlikely this is intended |
58 | 58 | continue; |
59 | 59 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | private function handleGetValue(DeclarativeSettingsGetValueEvent $event): void { |
45 | 45 | |
46 | 46 | if ($event->getFieldId() === 'mail_providers_enabled') { |
47 | - $event->setValue((int)$this->config->getValueBool('core', 'mail_providers_enabled', true)); |
|
47 | + $event->setValue((int) $this->config->getValueBool('core', 'mail_providers_enabled', true)); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | private function handleSetValue(DeclarativeSettingsSetValueEvent $event): void { |
53 | 53 | |
54 | 54 | if ($event->getFieldId() === 'mail_providers_enabled') { |
55 | - $this->config->setValueBool('core', 'mail_providers_enabled', (bool)$event->getValue()); |
|
55 | + $this->config->setValueBool('core', 'mail_providers_enabled', (bool) $event->getValue()); |
|
56 | 56 | $event->stopPropagation(); |
57 | 57 | } |
58 | 58 |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | return [ |
130 | 130 | 'token' => [ |
131 | 131 | 'type' => 'highlight', |
132 | - 'id' => (string)$event->getObjectId(), |
|
132 | + 'id' => (string) $event->getObjectId(), |
|
133 | 133 | 'name' => $parameters['name'], |
134 | 134 | ] |
135 | 135 | ]; |
@@ -137,12 +137,12 @@ discard block |
||
137 | 137 | return [ |
138 | 138 | 'token' => [ |
139 | 139 | 'type' => 'highlight', |
140 | - 'id' => (string)$event->getObjectId(), |
|
140 | + 'id' => (string) $event->getObjectId(), |
|
141 | 141 | 'name' => $parameters['name'], |
142 | 142 | ], |
143 | 143 | 'newToken' => [ |
144 | 144 | 'type' => 'highlight', |
145 | - 'id' => (string)$event->getObjectId(), |
|
145 | + 'id' => (string) $event->getObjectId(), |
|
146 | 146 | 'name' => $parameters['newName'], |
147 | 147 | ] |
148 | 148 | ]; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | private function formatSettings(array $settings, array $declarativeSettings): array { |
117 | 117 | $settings = array_merge($settings, $declarativeSettings); |
118 | 118 | |
119 | - usort($settings, function ($first, $second) { |
|
119 | + usort($settings, function($first, $second) { |
|
120 | 120 | $priorityOne = $first instanceof ISettings ? $first->getPriority() : $first['priority']; |
121 | 121 | $priorityTwo = $second instanceof ISettings ? $second->getPriority() : $second['priority']; |
122 | 122 | return $priorityOne - $priorityTwo; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $form = $setting->getForm(); |
129 | 129 | $html .= $form->renderAs('')->render(); |
130 | 130 | } else { |
131 | - $html .= '<div id="' . $setting['app'] . '_' . $setting['id'] . '"></div>'; |
|
131 | + $html .= '<div id="'.$setting['app'].'_'.$setting['id'].'"></div>'; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | return ['content' => $html]; |
@@ -157,7 +157,7 @@ |
||
157 | 157 | 'message' => $this->l->t('Please provide an admin recovery password; otherwise, all account data will be lost.'), |
158 | 158 | ] |
159 | 159 | ]); |
160 | - } elseif ($recoveryEnabledForUser && ! $validRecoveryPassword) { |
|
160 | + } elseif ($recoveryEnabledForUser && !$validRecoveryPassword) { |
|
161 | 161 | return new JSONResponse([ |
162 | 162 | 'status' => 'error', |
163 | 163 | 'data' => [ |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } catch (NotAdminException $e) { |
66 | 66 | throw $e; |
67 | 67 | } catch (Exception $e) { |
68 | - $this->logger->error('Failed to set declarative settings value: ' . $e->getMessage()); |
|
68 | + $this->logger->error('Failed to set declarative settings value: '.$e->getMessage()); |
|
69 | 69 | throw new OCSBadRequestException(); |
70 | 70 | } |
71 | 71 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if ($this->appManager->isEnabledForAnyone('app_api')) { |
98 | 98 | try { |
99 | 99 | Server::get(ExAppsPageService::class)->provideAppApiState($this->initialState); |
100 | - } catch (\Psr\Container\NotFoundExceptionInterface|\Psr\Container\ContainerExceptionInterface $e) { |
|
100 | + } catch (\Psr\Container\NotFoundExceptionInterface | \Psr\Container\ContainerExceptionInterface $e) { |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $hashName = md5($fileName); |
154 | 154 | $allFiles = $folder->getDirectoryListing(); |
155 | 155 | // Try to find the file |
156 | - $file = array_filter($allFiles, function (ISimpleFile $file) use ($hashName) { |
|
156 | + $file = array_filter($allFiles, function(ISimpleFile $file) use ($hashName) { |
|
157 | 157 | return str_starts_with($file->getName(), $hashName); |
158 | 158 | }); |
159 | 159 | // Get the first entry |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $fileResponse = $client->get($fileName); |
166 | 166 | $contentType = $fileResponse->getHeader('Content-Type'); |
167 | 167 | $extension = $info['extension'] ?? ''; |
168 | - $file = $folder->newFile($hashName . '.' . base64_encode($contentType) . '.' . $extension, $fileResponse->getBody()); |
|
168 | + $file = $folder->newFile($hashName.'.'.base64_encode($contentType).'.'.$extension, $fileResponse->getBody()); |
|
169 | 169 | } catch (\Throwable $e) { |
170 | 170 | $this->logger->warning('Could not load media file for app discover section', ['media_src' => $fileName, 'exception' => $e]); |
171 | 171 | return new NotFoundResponse(); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | if ($url === '') { |
252 | 252 | return ''; |
253 | 253 | } |
254 | - return 'https://usercontent.apps.nextcloud.com/' . base64_encode($url); |
|
254 | + return 'https://usercontent.apps.nextcloud.com/'.base64_encode($url); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | private function fetchApps() { |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } |
325 | 325 | |
326 | 326 | // Extend existing app details |
327 | - $apps = array_map(function (array $appData) use ($dependencyAnalyzer, $ignoreMaxApps) { |
|
327 | + $apps = array_map(function(array $appData) use ($dependencyAnalyzer, $ignoreMaxApps) { |
|
328 | 328 | if (isset($appData['appstoreData'])) { |
329 | 329 | $appstoreData = $appData['appstoreData']; |
330 | 330 | $appData['screenshot'] = $this->createProxyPreviewUrl($appstoreData['screenshots'][0]['url'] ?? ''); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | 'missingMaxOwnCloudVersion' => false, |
479 | 479 | 'missingMinOwnCloudVersion' => false, |
480 | 480 | 'canInstall' => true, |
481 | - 'screenshot' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($app['screenshots'][0]['url']) : '', |
|
481 | + 'screenshot' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($app['screenshots'][0]['url']) : '', |
|
482 | 482 | 'score' => $app['ratingOverall'], |
483 | 483 | 'ratingNumOverall' => $app['ratingNumOverall'], |
484 | 484 | 'ratingNumThresholdReached' => $app['ratingNumOverall'] > 5, |
@@ -627,8 +627,8 @@ discard block |
||
627 | 627 | } |
628 | 628 | |
629 | 629 | private function sortApps($a, $b) { |
630 | - $a = (string)$a['name']; |
|
631 | - $b = (string)$b['name']; |
|
630 | + $a = (string) $a['name']; |
|
631 | + $b = (string) $b['name']; |
|
632 | 632 | if ($a === $b) { |
633 | 633 | return 0; |
634 | 634 | } |