diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/App/CheckCode.php | 2 | ||||
-rw-r--r-- | core/Command/Db/ConvertType.php | 12 | ||||
-rw-r--r-- | core/Command/Db/Migrations/StatusCommand.php | 26 | ||||
-rw-r--r-- | core/Command/Integrity/CheckApp.php | 2 | ||||
-rw-r--r-- | core/Command/Integrity/CheckCore.php | 2 | ||||
-rw-r--r-- | core/Command/L10n/CreateJs.php | 4 | ||||
-rw-r--r-- | core/Command/Log/File.php | 2 | ||||
-rw-r--r-- | core/Command/Preview/Repair.php | 4 | ||||
-rw-r--r-- | core/Controller/AvatarController.php | 6 | ||||
-rw-r--r-- | core/Controller/LostController.php | 6 | ||||
-rw-r--r-- | core/Controller/SetupController.php | 2 | ||||
-rw-r--r-- | core/Controller/SvgController.php | 2 | ||||
-rw-r--r-- | core/ajax/update.php | 2 | ||||
-rw-r--r-- | core/templates/installation.php | 2 | ||||
-rw-r--r-- | core/templates/layout.public.php | 2 | ||||
-rw-r--r-- | core/templates/layout.user.php | 2 |
16 files changed, 39 insertions, 39 deletions
diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index f7b3723a8d3..40d632a1ad3 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -112,7 +112,7 @@ class CheckCode extends Command implements CompletionAwareInterface { $output->writeln(" {$count} errors"); } usort($errors, function ($a, $b) { - return $a['line'] >$b['line']; + return $a['line'] > $b['line']; }); foreach ($errors as $p) { diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 05bdef95bcb..d89d57ff601 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -312,7 +312,7 @@ class ConvertType extends Command implements CompletionAwareInterface { $count = $result->fetchColumn(); $result->closeCursor(); - $numChunks = ceil($count/$chunkSize); + $numChunks = ceil($count / $chunkSize); if ($numChunks > 1) { $output->writeln('chunked query, ' . $numChunks . ' chunks'); } @@ -432,11 +432,11 @@ class ConvertType extends Command implements CompletionAwareInterface { } $this->config->setSystemValues([ - 'dbtype' => $type, - 'dbname' => $dbName, - 'dbhost' => $dbHost, - 'dbuser' => $username, - 'dbpassword' => $password, + 'dbtype' => $type, + 'dbname' => $dbName, + 'dbhost' => $dbHost, + 'dbuser' => $username, + 'dbpassword' => $password, ]); } diff --git a/core/Command/Db/Migrations/StatusCommand.php b/core/Command/Db/Migrations/StatusCommand.php index dc92dfb1f50..2d6c92f0f36 100644 --- a/core/Command/Db/Migrations/StatusCommand.php +++ b/core/Command/Db/Migrations/StatusCommand.php @@ -107,19 +107,19 @@ class StatusCommand extends Command implements CompletionAwareInterface { $pending = $ms->describeMigrationStep('lastest'); $infos = [ - 'App' => $ms->getApp(), - 'Version Table Name' => $ms->getMigrationsTableName(), - 'Migrations Namespace' => $ms->getMigrationsNamespace(), - 'Migrations Directory' => $ms->getMigrationsDirectory(), - 'Previous Version' => $this->getFormattedVersionAlias($ms, 'prev'), - 'Current Version' => $this->getFormattedVersionAlias($ms, 'current'), - 'Next Version' => $this->getFormattedVersionAlias($ms, 'next'), - 'Latest Version' => $this->getFormattedVersionAlias($ms, 'latest'), - 'Executed Migrations' => count($executedMigrations), - 'Executed Unavailable Migrations' => $numExecutedUnavailableMigrations, - 'Available Migrations' => count($availableMigrations), - 'New Migrations' => $numNewMigrations, - 'Pending Migrations' => count($pending) ? $pending : 'None' + 'App' => $ms->getApp(), + 'Version Table Name' => $ms->getMigrationsTableName(), + 'Migrations Namespace' => $ms->getMigrationsNamespace(), + 'Migrations Directory' => $ms->getMigrationsDirectory(), + 'Previous Version' => $this->getFormattedVersionAlias($ms, 'prev'), + 'Current Version' => $this->getFormattedVersionAlias($ms, 'current'), + 'Next Version' => $this->getFormattedVersionAlias($ms, 'next'), + 'Latest Version' => $this->getFormattedVersionAlias($ms, 'latest'), + 'Executed Migrations' => count($executedMigrations), + 'Executed Unavailable Migrations' => $numExecutedUnavailableMigrations, + 'Available Migrations' => count($availableMigrations), + 'New Migrations' => $numNewMigrations, + 'Pending Migrations' => count($pending) ? $pending : 'None' ]; return $infos; diff --git a/core/Command/Integrity/CheckApp.php b/core/Command/Integrity/CheckApp.php index f613aab3808..7bf92001cc8 100644 --- a/core/Command/Integrity/CheckApp.php +++ b/core/Command/Integrity/CheckApp.php @@ -72,7 +72,7 @@ class CheckApp extends Base { $path = (string)$input->getOption('path'); $result = $this->checker->verifyAppSignature($appid, $path); $this->writeArrayInOutputFormat($input, $output, $result); - if (count($result)>0) { + if (count($result) > 0) { return 1; } return 0; diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php index acbc69903c7..6f319abdf74 100644 --- a/core/Command/Integrity/CheckCore.php +++ b/core/Command/Integrity/CheckCore.php @@ -63,7 +63,7 @@ class CheckCore extends Base { protected function execute(InputInterface $input, OutputInterface $output): int { $result = $this->checker->verifyCoreSignature(); $this->writeArrayInOutputFormat($input, $output, $result); - if (count($result)>0) { + if (count($result) > 0) { return 1; } return 0; diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php index 2402369d274..bcb68ced472 100644 --- a/core/Command/L10n/CreateJs.php +++ b/core/Command/L10n/CreateJs.php @@ -63,7 +63,7 @@ class CreateJs extends Command implements CompletionAwareInterface { } $languages = $lang; if (empty($lang)) { - $languages= $this->getAllLanguages($path); + $languages = $this->getAllLanguages($path); } foreach ($languages as $lang) { @@ -84,7 +84,7 @@ class CreateJs extends Command implements CompletionAwareInterface { if ($fileInfo->getExtension() !== 'php') { continue; } - $result[]= substr($fileInfo->getBasename(), 0, -4); + $result[] = substr($fileInfo->getBasename(), 0, -4); } return $result; diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php index 5ab3cc16e46..9cb2d062b13 100644 --- a/core/Command/Log/File.php +++ b/core/Command/Log/File.php @@ -108,7 +108,7 @@ class File extends Command implements Completion\CompletionAwareInterface { $defaultLogFile = rtrim($dataDir, '/').'/nextcloud.log'; $output->writeln('Log file: '.$this->config->getSystemValue('logfile', $defaultLogFile)); - $rotateSize = $this->config->getSystemValue('log_rotate_size', 100*1024*1024); + $rotateSize = $this->config->getSystemValue('log_rotate_size', 100 * 1024 * 1024); if ($rotateSize) { $rotateString = \OCP\Util::humanFileSize($rotateSize); } else { diff --git a/core/Command/Preview/Repair.php b/core/Command/Preview/Repair.php index 8c83ce2ebea..063213d0dd3 100644 --- a/core/Command/Preview/Repair.php +++ b/core/Command/Preview/Repair.php @@ -81,8 +81,8 @@ class Repair extends Command { protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->memoryLimit !== -1) { - $limitInMiB = round($this->memoryLimit / 1024 /1024, 1); - $thresholdInMiB = round($this->memoryTreshold / 1024 /1024, 1); + $limitInMiB = round($this->memoryLimit / 1024 / 1024, 1); + $thresholdInMiB = round($this->memoryTreshold / 1024 / 1024, 1); $output->writeln("Memory limit is $limitInMiB MiB"); $output->writeln("Memory threshold is $thresholdInMiB MiB"); $output->writeln(""); diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index c94d98da13e..ca3a739bf9f 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -134,7 +134,7 @@ class AvatarController extends Controller { } // Cache for 1 day - $response->cacheFor(60*60*24); + $response->cacheFor(60 * 60 * 24); return $response; } @@ -155,7 +155,7 @@ class AvatarController extends Controller { if (!($node instanceof File)) { return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]); } - if ($node->getSize() > 20*1024*1024) { + if ($node->getSize() > 20 * 1024 * 1024) { return new JSONResponse( ['data' => ['message' => $this->l->t('File is too big')]], Http::STATUS_BAD_REQUEST @@ -183,7 +183,7 @@ class AvatarController extends Controller { is_uploaded_file($files['tmp_name'][0]) && !\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0]) ) { - if ($files['size'][0] > 20*1024*1024) { + if ($files['size'][0] > 20 * 1024 * 1024) { return new JSONResponse( ['data' => ['message' => $this->l->t('File is too big')]], Http::STATUS_BAD_REQUEST diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 0a2e8d6b73d..861a701facd 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -216,7 +216,7 @@ class LostController extends Controller { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid')); } - if ($splittedToken[0] < ($this->timeFactory->getTime() - 60*60*24*7) || + if ($splittedToken[0] < ($this->timeFactory->getTime() - 60 * 60 * 24 * 7) || $user->getLastLogin() > $splittedToken[0]) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is expired')); } @@ -231,7 +231,7 @@ class LostController extends Controller { * @param array $additional * @return array */ - private function error($message, array $additional=[]) { + private function error($message, array $additional = []) { return array_merge(['status' => 'error', 'msg' => $message], $additional); } @@ -240,7 +240,7 @@ class LostController extends Controller { * @return array */ private function success($data = []) { - return array_merge($data, ['status'=>'success']); + return array_merge($data, ['status' => 'success']); } /** diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index dd7e4eefc81..96dad865c4b 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -70,7 +70,7 @@ class SetupController { return; } - if (isset($post['install']) and $post['install']=='true') { + if (isset($post['install']) and $post['install'] == 'true') { // We have to launch the installation process : $e = $this->setupHelper->install($post); $errors = ['errors' => $e]; diff --git a/core/Controller/SvgController.php b/core/Controller/SvgController.php index 573f245c5a1..b526d3b1491 100644 --- a/core/Controller/SvgController.php +++ b/core/Controller/SvgController.php @@ -62,7 +62,7 @@ class SvgController extends Controller { IconsCacher $iconsCacher) { parent::__construct($appName, $request); - $this->serverRoot = \OC::$SERVERROOT; + $this->serverRoot = \OC::$SERVERROOT; $this->timeFactory = $timeFactory; $this->appManager = $appManager; $this->iconsCacher = $iconsCacher; diff --git a/core/ajax/update.php b/core/ajax/update.php index 64ae2611579..ef6c0555490 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -190,7 +190,7 @@ if (\OCP\Util::needUpgrade()) { $eventSource->send('success', (string)$l->t('Updated "%1$s" to %2$s', [$app, $version])); }); $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) { - $incompatibleApps[]= $app; + $incompatibleApps[] = $app; }); $updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) { $eventSource->send('failure', $message); diff --git a/core/templates/installation.php b/core/templates/installation.php index eb1942d83ee..2cca084ad75 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -77,7 +77,7 @@ script('core', [ <?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) { $hasOtherDB = true; } else { - $hasOtherDB =false; + $hasOtherDB = false; } //other than SQLite?> <legend><?php p($l->t('Configure the database')); ?></legend> <div id="selectDbType"> diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php index 97de7817efd..f28ccf62450 100644 --- a/core/templates/layout.public.php +++ b/core/templates/layout.public.php @@ -15,7 +15,7 @@ <?php } ?> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> - <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!=='files')? $_['application']:$theme->getTitle()); ?>"> + <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] !== 'files')? $_['application']:$theme->getTitle()); ?>"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>"> diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 50c0eb2ef89..63bc26bc65f 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -15,7 +15,7 @@ <?php } ?> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> - <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:$theme->getTitle()); ?>"> + <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] != 'files')? $_['application']:$theme->getTitle()); ?>"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>"> |