diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 14:53:40 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 14:54:22 +0300 |
commit | afbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch) | |
tree | 7d8721cf8fc0329d6b750db63798de67a162b090 /core/Command | |
parent | 19e97e86c69ab128191439d6a17dacb5a630cf98 (diff) |
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/App/CheckCode.php | 8 | ||||
-rw-r--r-- | core/Command/Check.php | 2 | ||||
-rw-r--r-- | core/Command/Encryption/ListModules.php | 2 | ||||
-rw-r--r-- | core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php | 2 | ||||
-rw-r--r-- | core/Command/TwoFactorAuth/Base.php | 2 | ||||
-rw-r--r-- | core/Command/Upgrade.php | 38 |
6 files changed, 27 insertions, 27 deletions
diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index 3a17114261f..d37211d3add 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -94,12 +94,12 @@ class CheckCode extends Command implements CompletionAwareInterface { $codeChecker = new CodeChecker($checkList, !$input->getOption('skip-validate-info')); - $codeChecker->listen('CodeChecker', 'analyseFileBegin', function($params) use ($output) { + $codeChecker->listen('CodeChecker', 'analyseFileBegin', function ($params) use ($output) { if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln("<info>Analysing {$params}</info>"); } }); - $codeChecker->listen('CodeChecker', 'analyseFileFinished', function($filename, $errors) use ($output) { + $codeChecker->listen('CodeChecker', 'analyseFileFinished', function ($filename, $errors) use ($output) { $count = count($errors); // show filename if the verbosity is low, but there are errors in a file @@ -111,7 +111,7 @@ class CheckCode extends Command implements CompletionAwareInterface { if($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln(" {$count} errors"); } - usort($errors, function($a, $b) { + usort($errors, function ($a, $b) { return $a['line'] >$b['line']; }); @@ -127,7 +127,7 @@ class CheckCode extends Command implements CompletionAwareInterface { if(!$input->getOption('skip-validate-info')) { $infoChecker = new InfoChecker(); - $infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) { + $infoChecker->listen('InfoChecker', 'parseError', function ($error) use ($output) { $output->writeln("<error>Invalid appinfo.xml file found: $error</error>"); }); diff --git a/core/Command/Check.php b/core/Command/Check.php index b225aff61ed..234b038084b 100644 --- a/core/Command/Check.php +++ b/core/Command/Check.php @@ -52,7 +52,7 @@ class Check extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $errors = \OC_Util::checkServer($this->config); if (!empty($errors)) { - $errors = array_map(function($item) { + $errors = array_map(function ($item) { return (string) $item['error']; }, $errors); diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php index e8b7809c823..812d2542d51 100644 --- a/core/Command/Encryption/ListModules.php +++ b/core/Command/Encryption/ListModules.php @@ -85,7 +85,7 @@ class ListModules extends Base { */ protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) { if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { - array_walk($items, function(&$item) { + array_walk($items, function (&$item) { if (!$item['default']) { $item = $item['displayName']; } else { diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php index 39f1bb48812..249b899173e 100644 --- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php +++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php @@ -36,7 +36,7 @@ class GenerateMimetypeFileBuilder */ public function generateFile(array $aliases): string { // Remove comments - $keys = array_filter(array_keys($aliases), function($k) { + $keys = array_filter(array_keys($aliases), function ($k) { return $k[0] === '_'; }); foreach($keys as $key) { diff --git a/core/Command/TwoFactorAuth/Base.php b/core/Command/TwoFactorAuth/Base.php index 3af99daca07..1e1e659e617 100644 --- a/core/Command/TwoFactorAuth/Base.php +++ b/core/Command/TwoFactorAuth/Base.php @@ -54,7 +54,7 @@ class Base extends \OC\Core\Command\Base { */ public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { - return array_map(function(IUser $user) { + return array_map(function (IUser $user) { return $user->getUID(); }, $this->userManager->search($context->getCurrentWord(), 100)); } diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 7782496c76b..dadcdb0904c 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -105,7 +105,7 @@ class Upgrade extends Command { $dispatcher = \OC::$server->getEventDispatcher(); $progress = new ProgressBar($output); $progress->setFormat(" %message%\n %current%/%max% [%bar%] %percent:3s%%"); - $listener = function($event) use ($progress, $output) { + $listener = function ($event) use ($progress, $output) { if ($event instanceof GenericEvent) { $message = $event->getSubject(); if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { @@ -128,7 +128,7 @@ class Upgrade extends Command { } } }; - $repairListener = function($event) use ($progress, $output) { + $repairListener = function ($event) use ($progress, $output) { if (!$event instanceof GenericEvent) { return; } @@ -182,17 +182,17 @@ class Upgrade extends Command { $dispatcher->addListener('\OC\Repair::error', $repairListener); - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) { + $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($output) { $output->writeln('<info>Turned on maintenance mode</info>'); }); - $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use($output) { + $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($output) { $output->writeln('<info>Turned off maintenance mode</info>'); }); - $updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) { + $updater->listen('\OC\Updater', 'maintenanceActive', function () use ($output) { $output->writeln('<info>Maintenance mode is kept active</info>'); }); $updater->listen('\OC\Updater', 'updateEnd', - function ($success) use($output, $self) { + function ($success) use ($output, $self) { if ($success) { $message = "<info>Update successful</info>"; } else { @@ -200,28 +200,28 @@ class Upgrade extends Command { } $output->writeln($message); }); - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) { + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($output) { $output->writeln('<info>Updating database schema</info>'); }); - $updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) { + $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($output) { $output->writeln('<info>Updated database</info>'); }); - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) { + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($output) { $output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>'); }); - $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) { + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($output) { $output->writeln('<info>Checked database schema update</info>'); }); - $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) { + $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output) { $output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>'); }); - $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) { + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($output) { $output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>'); }); - $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) { + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($output) { $output->writeln('<info>Update app ' . $app . ' from appstore</info>'); }); - $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) { + $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($output) { $output->writeln('<info>Checked for update of app "' . $app . '" in appstore </info>'); }); $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) { @@ -239,19 +239,19 @@ class Upgrade extends Command { $updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) { $output->writeln("<info>Updated <$app> to $version</info>"); }); - $updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) { + $updater->listen('\OC\Updater', 'failure', function ($message) use ($output, $self) { $output->writeln("<error>$message</error>"); }); - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) { + $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($output) { $output->writeln("<info>Set log level to debug</info>"); }); - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) { + $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($output) { $output->writeln("<info>Reset log level</info>"); }); - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($output) { + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($output) { $output->writeln("<info>Starting code integrity check...</info>"); }); - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($output) { + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($output) { $output->writeln("<info>Finished code integrity check</info>"); }); |