aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Background/JobBase.php2
-rw-r--r--core/Command/Background/ListCommand.php2
-rw-r--r--core/Command/Config/Import.php2
-rw-r--r--core/Command/Db/ConvertType.php6
-rw-r--r--core/Command/Info/File.php8
-rw-r--r--core/Command/Integrity/SignApp.php4
-rw-r--r--core/Command/L10n/CreateJs.php2
-rw-r--r--core/Command/Log/File.php10
-rw-r--r--core/Command/Log/Manage.php8
-rw-r--r--core/Command/Maintenance/Install.php6
-rw-r--r--core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php4
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateDB.php8
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateJS.php2
-rw-r--r--core/Command/SetupChecks.php10
-rw-r--r--core/Command/SystemTag/Add.php2
-rw-r--r--core/Command/SystemTag/Edit.php4
-rw-r--r--core/Command/Upgrade.php2
-rw-r--r--core/Command/User/AuthTokens/Add.php2
-rw-r--r--core/Command/User/SyncAccountDataCommand.php2
-rw-r--r--core/Command/User/Welcome.php2
20 files changed, 44 insertions, 44 deletions
diff --git a/core/Command/Background/JobBase.php b/core/Command/Background/JobBase.php
index 7229d7589ee..d92bb77d4b6 100644
--- a/core/Command/Background/JobBase.php
+++ b/core/Command/Background/JobBase.php
@@ -19,7 +19,7 @@ abstract class JobBase extends \OC\Core\Command\Base {
public function __construct(
protected IJobList $jobList,
- protected LoggerInterface $logger
+ protected LoggerInterface $logger,
) {
parent::__construct();
}
diff --git a/core/Command/Background/ListCommand.php b/core/Command/Background/ListCommand.php
index 005f0418579..c8efbfef5c7 100644
--- a/core/Command/Background/ListCommand.php
+++ b/core/Command/Background/ListCommand.php
@@ -53,7 +53,7 @@ class ListCommand extends Base {
$jobsInfo = $this->formatJobs($this->jobList->getJobsIterator($input->getOption('class'), $limit, (int)$input->getOption('offset')));
$this->writeTableInOutputFormat($input, $output, $jobsInfo);
if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN && count($jobsInfo) >= $limit) {
- $output->writeln("\n<comment>Output is currently limited to " . $limit . ' jobs. Specify `-l, --limit[=LIMIT]` to override.</comment>');
+ $output->writeln("\n<comment>Output is currently limited to " . $limit . ' jobs. Specify `-l, --limit[=LIMIT]` to override.</comment>');
}
return 0;
}
diff --git a/core/Command/Config/Import.php b/core/Command/Config/Import.php
index 9974b11e19c..b58abec3390 100644
--- a/core/Command/Config/Import.php
+++ b/core/Command/Config/Import.php
@@ -49,7 +49,7 @@ class Import extends Command implements CompletionAwareInterface {
try {
$configs = $this->validateFileContent($content);
} catch (\UnexpectedValueException $e) {
- $output->writeln('<error>' . $e->getMessage(). '</error>');
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
return 1;
}
diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php
index 031d5a83d12..43b2d62a900 100644
--- a/core/Command/Db/ConvertType.php
+++ b/core/Command/Db/ConvertType.php
@@ -215,7 +215,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
$apps = $input->getOption('all-apps') ? \OC_App::getAllApps() : \OC_App::getEnabledApps();
foreach ($apps as $app) {
- $output->writeln('<info> - '.$app.'</info>');
+ $output->writeln('<info> - ' . $app . '</info>');
// Make sure autoloading works...
\OC_App::loadApp($app);
$fromMS = new MigrationService($app, $fromDB);
@@ -404,7 +404,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
try {
// copy table rows
foreach ($tables as $table) {
- $output->writeln('<info> - '.$table.'</info>');
+ $output->writeln('<info> - ' . $table . '</info>');
$this->copyTable($fromDB, $toDB, $schema->getTable($table), $input, $output);
}
if ($input->getArgument('type') === 'pgsql') {
@@ -427,7 +427,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
$dbName = $input->getArgument('database');
$password = $input->getOption('password');
if ($input->getOption('port')) {
- $dbHost .= ':'.$input->getOption('port');
+ $dbHost .= ':' . $input->getOption('port');
}
$this->config->setSystemValues([
diff --git a/core/Command/Info/File.php b/core/Command/Info/File.php
index 76fbd38712c..2a557b6768e 100644
--- a/core/Command/Info/File.php
+++ b/core/Command/Info/File.php
@@ -33,7 +33,7 @@ class File extends Command {
public function __construct(
IFactory $l10nFactory,
private FileUtils $fileUtils,
- private \OC\Encryption\Util $encryptionUtil
+ private \OC\Encryption\Util $encryptionUtil,
) {
$this->l10n = $l10nFactory->get('core');
parent::__construct();
@@ -85,7 +85,7 @@ class File extends Command {
return $node->getSize();
}, $children));
if ($childSize != $node->getSize()) {
- $output->writeln(' <error>warning: folder has a size of ' . Util::humanFileSize($node->getSize()) ." but it's children sum up to " . Util::humanFileSize($childSize) . '</error>.');
+ $output->writeln(' <error>warning: folder has a size of ' . Util::humanFileSize($node->getSize()) . " but it's children sum up to " . Util::humanFileSize($childSize) . '</error>.');
$output->writeln(' Run <info>occ files:scan --path ' . $node->getPath() . '</info> to attempt to resolve this.');
}
if ($showChildren) {
@@ -164,10 +164,10 @@ class File extends Command {
}
if ($input->getOption('storage-tree')) {
$storageTmp = $storage;
- $storageClass = get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
+ $storageClass = get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
while ($storageTmp instanceof \OC\Files\Storage\Wrapper\Wrapper) {
$storageTmp = $storageTmp->getWrapperStorage();
- $storageClass .= "\n\t".'> '.get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
+ $storageClass .= "\n\t" . '> ' . get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
}
$output->writeln(' storage wrapping: ' . $storageClass);
}
diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php
index 6df84662388..d307bc58985 100644
--- a/core/Command/Integrity/SignApp.php
+++ b/core/Command/Integrity/SignApp.php
@@ -51,7 +51,7 @@ class SignApp extends Command {
$documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity');
$output->writeln('This command requires the --path, --privateKey and --certificate.');
$output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"');
- $output->writeln('For more information please consult the documentation: '. $documentationUrl);
+ $output->writeln('For more information please consult the documentation: ' . $documentationUrl);
return 1;
}
@@ -75,7 +75,7 @@ class SignApp extends Command {
$x509->setPrivateKey($rsa);
try {
$this->checker->writeAppSignature($path, $x509, $rsa);
- $output->writeln('Successfully signed "'.$path.'"');
+ $output->writeln('Successfully signed "' . $path . '"');
} catch (\Exception $e) {
$output->writeln('Error: ' . $e->getMessage());
return 1;
diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php
index 7d45fbe91f8..64a21e6d48c 100644
--- a/core/Command/L10n/CreateJs.php
+++ b/core/Command/L10n/CreateJs.php
@@ -153,7 +153,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
$appName = $context->getWordAtIndex($context->getWordIndex() - 1);
try {
return $this->getAllLanguages($this->appManager->getAppPath($appName));
- } catch(AppPathNotFoundException) {
+ } catch (AppPathNotFoundException) {
return [];
}
}
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php
index e04d19f51cf..8b4a38db611 100644
--- a/core/Command/Log/File.php
+++ b/core/Command/Log/File.php
@@ -79,11 +79,11 @@ class File extends Command implements Completion\CompletionAwareInterface {
} else {
$enabledText = 'disabled';
}
- $output->writeln('Log backend file: '.$enabledText);
+ $output->writeln('Log backend file: ' . $enabledText);
- $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
- $defaultLogFile = rtrim($dataDir, '/').'/nextcloud.log';
- $output->writeln('Log file: '.$this->config->getSystemValue('logfile', $defaultLogFile));
+ $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
+ $defaultLogFile = rtrim($dataDir, '/') . '/nextcloud.log';
+ $output->writeln('Log file: ' . $this->config->getSystemValue('logfile', $defaultLogFile));
$rotateSize = $this->config->getSystemValue('log_rotate_size', 100 * 1024 * 1024);
if ($rotateSize) {
@@ -91,7 +91,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
} else {
$rotateString = 'disabled';
}
- $output->writeln('Rotate at: '.$rotateString);
+ $output->writeln('Rotate at: ' . $rotateString);
return 0;
}
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index e68720a1280..f67f0d969f6 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -84,14 +84,14 @@ class Manage extends Command implements CompletionAwareInterface {
// display configuration
$backend = $this->config->getSystemValue('log_type', self::DEFAULT_BACKEND);
- $output->writeln('Enabled logging backend: '.$backend);
+ $output->writeln('Enabled logging backend: ' . $backend);
$levelNum = $this->config->getSystemValue('loglevel', self::DEFAULT_LOG_LEVEL);
$level = $this->convertLevelNumber($levelNum);
- $output->writeln('Log level: '.$level.' ('.$levelNum.')');
+ $output->writeln('Log level: ' . $level . ' (' . $levelNum . ')');
$timezone = $this->config->getSystemValue('logtimezone', self::DEFAULT_TIMEZONE);
- $output->writeln('Log timezone: '.$timezone);
+ $output->writeln('Log timezone: ' . $timezone);
return 0;
}
@@ -100,7 +100,7 @@ class Manage extends Command implements CompletionAwareInterface {
* @throws \InvalidArgumentException
*/
protected function validateBackend($backend) {
- if (!class_exists('OC\\Log\\'.ucfirst($backend))) {
+ if (!class_exists('OC\\Log\\' . ucfirst($backend))) {
throw new \InvalidArgumentException('Invalid backend');
}
}
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index a954beb406d..31f6d1cd79d 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -46,7 +46,7 @@ class Install extends Command {
->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'Login of the admin account', 'admin')
->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account')
->addOption('admin-email', null, InputOption::VALUE_OPTIONAL, 'E-Mail of the admin account')
- ->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT.'/data');
+ ->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT . '/data');
}
protected function execute(InputInterface $input, OutputInterface $output): int {
@@ -134,7 +134,7 @@ class Install extends Command {
if (is_null($dbPass)) {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
- $question = new Question('What is the password to access the database with user <'.$dbUser.'>?');
+ $question = new Question('What is the password to access the database with user <' . $dbUser . '>?');
$question->setHidden(true);
$question->setHiddenFallback(false);
$dbPass = $helper->ask($input, $output, $question);
@@ -144,7 +144,7 @@ class Install extends Command {
if (is_null($adminPassword)) {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
- $question = new Question('What is the password you like to use for the admin account <'.$adminLogin.'>?');
+ $question = new Question('What is the password you like to use for the admin account <' . $adminLogin . '>?');
$question->setHidden(true);
$question->setHiddenFallback(false);
$adminPassword = $helper->ask($input, $output, $question);
diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
index 1a6c3933461..283809a9031 100644
--- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
+++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
@@ -22,7 +22,7 @@ class GenerateMimetypeFileBuilder {
}, ARRAY_FILTER_USE_KEY);
// Fetch all files
- $dir = new \DirectoryIterator(\OC::$SERVERROOT.'/core/img/filetypes');
+ $dir = new \DirectoryIterator(\OC::$SERVERROOT . '/core/img/filetypes');
$files = [];
foreach ($dir as $fileInfo) {
@@ -38,7 +38,7 @@ class GenerateMimetypeFileBuilder {
// Fetch all themes!
$themes = [];
- $dirs = new \DirectoryIterator(\OC::$SERVERROOT.'/themes/');
+ $dirs = new \DirectoryIterator(\OC::$SERVERROOT . '/themes/');
foreach ($dirs as $dir) {
//Valid theme dir
if ($dir->isFile() || $dir->isDot()) {
diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php
index fd448cf862a..9ba535ef658 100644
--- a/core/Command/Maintenance/Mimetype/UpdateDB.php
+++ b/core/Command/Maintenance/Mimetype/UpdateDB.php
@@ -55,21 +55,21 @@ class UpdateDB extends Command {
$mimetypeId = $this->mimetypeLoader->getId($mimetype);
if (!$existing) {
- $output->writeln('Added mimetype "'.$mimetype.'" to database');
+ $output->writeln('Added mimetype "' . $mimetype . '" to database');
$totalNewMimetypes++;
}
if (!$existing || $input->getOption('repair-filecache')) {
$touchedFilecacheRows = $this->mimetypeLoader->updateFilecache($ext, $mimetypeId);
if ($touchedFilecacheRows > 0) {
- $output->writeln('Updated '.$touchedFilecacheRows.' filecache rows for mimetype "'.$mimetype.'"');
+ $output->writeln('Updated ' . $touchedFilecacheRows . ' filecache rows for mimetype "' . $mimetype . '"');
}
$totalFilecacheUpdates += $touchedFilecacheRows;
}
}
- $output->writeln('Added '.$totalNewMimetypes.' new mimetypes');
- $output->writeln('Updated '.$totalFilecacheUpdates.' filecache rows');
+ $output->writeln('Added ' . $totalNewMimetypes . ' new mimetypes');
+ $output->writeln('Updated ' . $totalFilecacheUpdates . ' filecache rows');
return 0;
}
}
diff --git a/core/Command/Maintenance/Mimetype/UpdateJS.php b/core/Command/Maintenance/Mimetype/UpdateJS.php
index a1559024f2e..35633f16355 100644
--- a/core/Command/Maintenance/Mimetype/UpdateJS.php
+++ b/core/Command/Maintenance/Mimetype/UpdateJS.php
@@ -32,7 +32,7 @@ class UpdateJS extends Command {
// Output the JS
$generatedMimetypeFile = new GenerateMimetypeFileBuilder();
- file_put_contents(\OC::$SERVERROOT.'/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases));
+ file_put_contents(\OC::$SERVERROOT . '/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases));
$output->writeln('<info>mimetypelist.js is updated');
return 0;
diff --git a/core/Command/SetupChecks.php b/core/Command/SetupChecks.php
index fda463b8f6d..60517e224b3 100644
--- a/core/Command/SetupChecks.php
+++ b/core/Command/SetupChecks.php
@@ -61,11 +61,11 @@ class SetupChecks extends Base {
$description = $this->richTextFormatter->richToParsed($description, $descriptionParameters);
}
$output->writeln(
- "\t\t".
- ($styleTag !== null ? "<{$styleTag}>" : '').
- "{$emoji} ".
- ($check->getName() ?? $check::class).
- ($description !== null ? ': '.$description : '').
+ "\t\t" .
+ ($styleTag !== null ? "<{$styleTag}>" : '') .
+ "{$emoji} " .
+ ($check->getName() ?? $check::class) .
+ ($description !== null ? ': ' . $description : '') .
($styleTag !== null ? "</{$styleTag}>" : ''),
$verbosity
);
diff --git a/core/Command/SystemTag/Add.php b/core/Command/SystemTag/Add.php
index 9d8f7ae05e4..92ed42c37bc 100644
--- a/core/Command/SystemTag/Add.php
+++ b/core/Command/SystemTag/Add.php
@@ -73,7 +73,7 @@ class Add extends Base {
]);
return 0;
} catch (TagAlreadyExistsException $e) {
- $output->writeln('<error>'.$e->getMessage().'</error>');
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
return 2;
}
}
diff --git a/core/Command/SystemTag/Edit.php b/core/Command/SystemTag/Edit.php
index 7ac74cbc53a..eb6412b7639 100644
--- a/core/Command/SystemTag/Edit.php
+++ b/core/Command/SystemTag/Edit.php
@@ -82,13 +82,13 @@ class Edit extends Base {
try {
$this->systemTagManager->updateTag($input->getArgument('id'), $name, $userVisible, $userAssignable);
- $output->writeln('<info>Tag updated ("' . $name . '", '. $userVisible . ', ' . $userAssignable . ')</info>');
+ $output->writeln('<info>Tag updated ("' . $name . '", ' . $userVisible . ', ' . $userAssignable . ')</info>');
return 0;
} catch (TagNotFoundException $e) {
$output->writeln('<error>Tag not found</error>');
return 1;
} catch (TagAlreadyExistsException $e) {
- $output->writeln('<error>'.$e->getMessage().'</error>');
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
return 2;
}
}
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 7b1526766f3..a9ed4cf2fd1 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -35,7 +35,7 @@ class Upgrade extends Command {
public const ERROR_FAILURE = 5;
public function __construct(
- private IConfig $config
+ private IConfig $config,
) {
parent::__construct();
}
diff --git a/core/Command/User/AuthTokens/Add.php b/core/Command/User/AuthTokens/Add.php
index 43386b7709a..ad4bf732bd0 100644
--- a/core/Command/User/AuthTokens/Add.php
+++ b/core/Command/User/AuthTokens/Add.php
@@ -81,7 +81,7 @@ class Add extends Command {
$output->writeln('<info>No password provided. The generated app password will therefore have limited capabilities. Any operation that requires the login password will fail.</info>');
}
- $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$generatedToken = $this->tokenProvider->generateToken(
$token,
$user->getUID(),
diff --git a/core/Command/User/SyncAccountDataCommand.php b/core/Command/User/SyncAccountDataCommand.php
index e8fcccdaa28..640b66581e1 100644
--- a/core/Command/User/SyncAccountDataCommand.php
+++ b/core/Command/User/SyncAccountDataCommand.php
@@ -21,7 +21,7 @@ class SyncAccountDataCommand extends Base {
public function __construct(
IUserManager $userManager,
- IAccountManager $accountManager
+ IAccountManager $accountManager,
) {
$this->userManager = $userManager;
$this->accountManager = $accountManager;
diff --git a/core/Command/User/Welcome.php b/core/Command/User/Welcome.php
index ba1c88a26c5..c383811f982 100644
--- a/core/Command/User/Welcome.php
+++ b/core/Command/User/Welcome.php
@@ -27,7 +27,7 @@ class Welcome extends Base {
*/
public function __construct(
IUserManager $userManager,
- NewUserMailHelper $newUserMailHelper
+ NewUserMailHelper $newUserMailHelper,
) {
parent::__construct();