aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/App/Update.php2
-rw-r--r--core/Command/Encryption/ListModules.php2
-rw-r--r--core/Command/L10n/CreateJs.php10
-rw-r--r--core/Command/Status.php4
-rw-r--r--core/Command/Upgrade.php2
-rw-r--r--core/Command/User/Report.php16
6 files changed, 18 insertions, 18 deletions
diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php
index f02da1c66ba..19d0251d824 100644
--- a/core/Command/App/Update.php
+++ b/core/Command/App/Update.php
@@ -83,7 +83,7 @@ class Update extends Command {
$singleAppId = $input->getArgument('app-id');
if ($singleAppId) {
- $apps = array($singleAppId);
+ $apps = [$singleAppId];
try {
$this->manager->getAppPath($singleAppId);
} catch (\OCP\App\AppPathNotFoundException $e) {
diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php
index c38571d7c62..dd9290eea81 100644
--- a/core/Command/Encryption/ListModules.php
+++ b/core/Command/Encryption/ListModules.php
@@ -69,7 +69,7 @@ class ListModules extends Base {
$encryptionModules = $this->encryptionManager->getEncryptionModules();
$defaultEncryptionModuleId = $this->encryptionManager->getDefaultEncryptionModuleId();
- $encModules = array();
+ $encModules = [];
foreach ($encryptionModules as $module) {
$encModules[$module['id']]['displayName'] = $module['displayName'];
$encModules[$module['id']]['default'] = $module['id'] === $defaultEncryptionModuleId;
diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php
index f2b833fe914..3e67e1329f0 100644
--- a/core/Command/L10n/CreateJs.php
+++ b/core/Command/L10n/CreateJs.php
@@ -72,7 +72,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
}
private function getAllLanguages($path) {
- $result = array();
+ $result = [];
foreach (new DirectoryIterator("$path/l10n") as $fileInfo) {
if($fileInfo->isDot()) {
continue;
@@ -102,7 +102,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
return;
}
$content = "OC.L10N.register(\n \"$app\",\n {\n ";
- $jsTrans = array();
+ $jsTrans = [];
foreach ($translations as $id => $val) {
if (is_array($val)) {
$val = '[ ' . implode(',', $val) . ']';
@@ -122,21 +122,21 @@ class CreateJs extends Command implements CompletionAwareInterface {
$output->writeln("File already exists: $jsFile");
return;
}
- $content = array('translations' => $translations, 'pluralForm' => $plurals);
+ $content = ['translations' => $translations, 'pluralForm' => $plurals];
file_put_contents($jsFile, json_encode($content));
$output->writeln("Json translation file generated: $jsFile");
}
private function loadTranslations($path, $lang) {
$phpFile = "$path/l10n/$lang.php";
- $TRANSLATIONS = array();
+ $TRANSLATIONS = [];
$PLURAL_FORMS = '';
if (!file_exists($phpFile)) {
throw new UnexpectedValueException("PHP translation file <$phpFile> does not exist.");
}
require $phpFile;
- return array($TRANSLATIONS, $PLURAL_FORMS);
+ return [$TRANSLATIONS, $PLURAL_FORMS];
}
/**
diff --git a/core/Command/Status.php b/core/Command/Status.php
index 8f615004f3c..25632a313f3 100644
--- a/core/Command/Status.php
+++ b/core/Command/Status.php
@@ -38,12 +38,12 @@ class Status extends Base {
}
protected function execute(InputInterface $input, OutputInterface $output) {
- $values = array(
+ $values = [
'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
'version' => implode('.', \OCP\Util::getVersion()),
'versionstring' => \OC_Util::getVersionString(),
'edition' => '',
- );
+ ];
$this->writeArrayInOutputFormat($input, $output, $values);
}
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 944b1da9f26..0a66d63fd32 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -285,7 +285,7 @@ class Upgrade extends Command {
* @param OutputInterface $output output interface
*/
protected function postUpgradeCheck(InputInterface $input, OutputInterface $output) {
- $trustedDomains = $this->config->getSystemValue('trusted_domains', array());
+ $trustedDomains = $this->config->getSystemValue('trusted_domains', []);
if (empty($trustedDomains)) {
$output->write(
'<warning>The setting "trusted_domains" could not be ' .
diff --git a/core/Command/User/Report.php b/core/Command/User/Report.php
index 3f15d40dba7..77fbcc124fa 100644
--- a/core/Command/User/Report.php
+++ b/core/Command/User/Report.php
@@ -52,25 +52,25 @@ class Report extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
$table = new Table($output);
- $table->setHeaders(array('User Report', ''));
+ $table->setHeaders(['User Report', '']);
$userCountArray = $this->countUsers();
if(!empty($userCountArray)) {
$total = 0;
- $rows = array();
+ $rows = [];
foreach($userCountArray as $classname => $users) {
$total += $users;
- $rows[] = array($classname, $users);
+ $rows[] = [$classname, $users];
}
- $rows[] = array(' ');
- $rows[] = array('total users', $total);
+ $rows[] = [' '];
+ $rows[] = ['total users', $total];
} else {
- $rows[] = array('No backend enabled that supports user counting', '');
+ $rows[] = ['No backend enabled that supports user counting', ''];
}
$userDirectoryCount = $this->countUserDirectories();
- $rows[] = array(' ');
- $rows[] = array('user directories', $userDirectoryCount);
+ $rows[] = [' '];
+ $rows[] = ['user directories', $userDirectoryCount];
$table->setRows($rows);
$table->render();