summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 15:12:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 20:25:24 +0200
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /core/Command
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
downloadnextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz
nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/App/CheckCode.php2
-rw-r--r--core/Command/Db/ConvertType.php12
-rw-r--r--core/Command/Db/Migrations/StatusCommand.php26
-rw-r--r--core/Command/Integrity/CheckApp.php2
-rw-r--r--core/Command/Integrity/CheckCore.php2
-rw-r--r--core/Command/L10n/CreateJs.php4
-rw-r--r--core/Command/Log/File.php2
-rw-r--r--core/Command/Preview/Repair.php4
8 files changed, 27 insertions, 27 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("");