@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'www.edri.org', |
137 | 137 | ]; |
138 | 138 | |
139 | - foreach($siteArray as $site) { |
|
139 | + foreach ($siteArray as $site) { |
|
140 | 140 | if ($this->isSiteReachable($site)) { |
141 | 141 | return true; |
142 | 142 | } |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | * @return bool |
150 | 150 | */ |
151 | 151 | private function isSiteReachable($sitename) { |
152 | - $httpSiteName = 'http://' . $sitename . '/'; |
|
153 | - $httpsSiteName = 'https://' . $sitename . '/'; |
|
152 | + $httpSiteName = 'http://'.$sitename.'/'; |
|
153 | + $httpsSiteName = 'https://'.$sitename.'/'; |
|
154 | 154 | |
155 | 155 | try { |
156 | 156 | $client = $this->clientService->newClient(); |
@@ -207,40 +207,40 @@ discard block |
||
207 | 207 | // Don't run check when: |
208 | 208 | // 1. Server has `has_internet_connection` set to false |
209 | 209 | // 2. AppStore AND S2S is disabled |
210 | - if(!$this->config->getSystemValue('has_internet_connection', true)) { |
|
210 | + if (!$this->config->getSystemValue('has_internet_connection', true)) { |
|
211 | 211 | return ''; |
212 | 212 | } |
213 | - if(!$this->config->getSystemValue('appstoreenabled', true) |
|
213 | + if (!$this->config->getSystemValue('appstoreenabled', true) |
|
214 | 214 | && $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'no' |
215 | 215 | && $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'no') { |
216 | 216 | return ''; |
217 | 217 | } |
218 | 218 | |
219 | 219 | $versionString = $this->getCurlVersion(); |
220 | - if(isset($versionString['ssl_version'])) { |
|
220 | + if (isset($versionString['ssl_version'])) { |
|
221 | 221 | $versionString = $versionString['ssl_version']; |
222 | 222 | } else { |
223 | 223 | return ''; |
224 | 224 | } |
225 | 225 | |
226 | - $features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing'); |
|
227 | - if(!$this->config->getSystemValue('appstoreenabled', true)) { |
|
228 | - $features = (string)$this->l10n->t('Federated Cloud Sharing'); |
|
226 | + $features = (string) $this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing'); |
|
227 | + if (!$this->config->getSystemValue('appstoreenabled', true)) { |
|
228 | + $features = (string) $this->l10n->t('Federated Cloud Sharing'); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | // Check if at least OpenSSL after 1.01d or 1.0.2b |
232 | - if(strpos($versionString, 'OpenSSL/') === 0) { |
|
232 | + if (strpos($versionString, 'OpenSSL/') === 0) { |
|
233 | 233 | $majorVersion = substr($versionString, 8, 5); |
234 | 234 | $patchRelease = substr($versionString, 13, 6); |
235 | 235 | |
236 | - if(($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) || |
|
236 | + if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) || |
|
237 | 237 | ($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) { |
238 | 238 | return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['OpenSSL', $versionString, $features]); |
239 | 239 | } |
240 | 240 | } |
241 | 241 | |
242 | 242 | // Check if NSS and perform heuristic check |
243 | - if(strpos($versionString, 'NSS/') === 0) { |
|
243 | + if (strpos($versionString, 'NSS/') === 0) { |
|
244 | 244 | try { |
245 | 245 | $firstClient = $this->clientService->newClient(); |
246 | 246 | $firstClient->get('https://nextcloud.com/'); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $secondClient = $this->clientService->newClient(); |
249 | 249 | $secondClient->get('https://nextcloud.com/'); |
250 | 250 | } catch (ClientException $e) { |
251 | - if($e->getResponse()->getStatusCode() === 400) { |
|
251 | + if ($e->getResponse()->getStatusCode() === 400) { |
|
252 | 252 | return (string) $this->l10n->t('cURL is using an outdated %s version (%s). Please update your operating system or features such as %s will not work reliably.', ['NSS', $versionString, $features]); |
253 | 253 | } |
254 | 254 | } |
@@ -343,13 +343,13 @@ discard block |
||
343 | 343 | * @return DataResponse |
344 | 344 | */ |
345 | 345 | public function getFailedIntegrityCheckFiles() { |
346 | - if(!$this->checker->isCodeCheckEnforced()) { |
|
346 | + if (!$this->checker->isCodeCheckEnforced()) { |
|
347 | 347 | return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.'); |
348 | 348 | } |
349 | 349 | |
350 | 350 | $completeResults = $this->checker->getResults(); |
351 | 351 | |
352 | - if(!empty($completeResults)) { |
|
352 | + if (!empty($completeResults)) { |
|
353 | 353 | $formattedTextResponse = 'Technical information |
354 | 354 | ===================== |
355 | 355 | The following list covers which files have failed the integrity check. Please read |
@@ -359,12 +359,12 @@ discard block |
||
359 | 359 | Results |
360 | 360 | ======= |
361 | 361 | '; |
362 | - foreach($completeResults as $context => $contextResult) { |
|
362 | + foreach ($completeResults as $context => $contextResult) { |
|
363 | 363 | $formattedTextResponse .= "- $context\n"; |
364 | 364 | |
365 | - foreach($contextResult as $category => $result) { |
|
365 | + foreach ($contextResult as $category => $result) { |
|
366 | 366 | $formattedTextResponse .= "\t- $category\n"; |
367 | - if($category !== 'EXCEPTION') { |
|
367 | + if ($category !== 'EXCEPTION') { |
|
368 | 368 | foreach ($result as $key => $results) { |
369 | 369 | $formattedTextResponse .= "\t\t- $key\n"; |
370 | 370 | } |
@@ -405,27 +405,27 @@ discard block |
||
405 | 405 | protected function isOpcacheProperlySetup() { |
406 | 406 | $iniWrapper = new IniGetWrapper(); |
407 | 407 | |
408 | - if(!$iniWrapper->getBool('opcache.enable')) { |
|
408 | + if (!$iniWrapper->getBool('opcache.enable')) { |
|
409 | 409 | return false; |
410 | 410 | } |
411 | 411 | |
412 | - if(!$iniWrapper->getBool('opcache.save_comments')) { |
|
412 | + if (!$iniWrapper->getBool('opcache.save_comments')) { |
|
413 | 413 | return false; |
414 | 414 | } |
415 | 415 | |
416 | - if(!$iniWrapper->getBool('opcache.enable_cli')) { |
|
416 | + if (!$iniWrapper->getBool('opcache.enable_cli')) { |
|
417 | 417 | return false; |
418 | 418 | } |
419 | 419 | |
420 | - if($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { |
|
420 | + if ($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { |
|
421 | 421 | return false; |
422 | 422 | } |
423 | 423 | |
424 | - if($iniWrapper->getNumeric('opcache.memory_consumption') < 128) { |
|
424 | + if ($iniWrapper->getNumeric('opcache.memory_consumption') < 128) { |
|
425 | 425 | return false; |
426 | 426 | } |
427 | 427 | |
428 | - if($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { |
|
428 | + if ($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { |
|
429 | 429 | return false; |
430 | 430 | } |
431 | 431 | |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | protected function getSuggestedOverwriteCliURL(): string { |
502 | 502 | $suggestedOverwriteCliUrl = ''; |
503 | 503 | if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { |
504 | - $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; |
|
504 | + $suggestedOverwriteCliUrl = $this->request->getServerProtocol().'://'.$this->request->getInsecureServerHost().\OC::$WEBROOT; |
|
505 | 505 | if (!$this->config->getSystemValue('config_is_read_only', false)) { |
506 | 506 | // Set the overwrite URL when it was not set yet. |
507 | 507 | $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | return [ |
517 | 517 | 'diffInSeconds' => time() - $lastCronRun, |
518 | 518 | 'relativeTime' => $this->dateTimeFormatter->formatTimeSpan($lastCronRun), |
519 | - 'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs', |
|
519 | + 'backgroundJobsUrl' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']).'#backgroundjobs', |
|
520 | 520 | ]; |
521 | 521 | } |
522 | 522 | |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | |
575 | 575 | foreach ($appsDir as $fileInfo) { |
576 | 576 | if ($fileInfo->isDir() && !$fileInfo->isDot()) { |
577 | - $absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename(); |
|
577 | + $absAppPath = $appsPath.DIRECTORY_SEPARATOR.$fileInfo->getFilename(); |
|
578 | 578 | $appDirUser = fileowner($absAppPath); |
579 | 579 | if ($appDirUser !== $currentUser) { |
580 | 580 | $appDirsWithDifferentOwner[] = $absAppPath; |