diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Updater.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 611da73254e..91a0943e048 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -124,22 +124,22 @@ class Updater extends BasicEmitter { $installedVersion = $this->config->getSystemValue('version', '0.0.0'); $currentVersion = implode('.', \OCP\Util::getVersion()); - $this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core')); + $this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, ['app' => 'core']); $success = true; try { $this->doUpgrade($currentVersion, $installedVersion); } catch (HintException $exception) { $this->log->logException($exception, ['app' => 'core']); - $this->emit('\OC\Updater', 'failure', array($exception->getMessage() . ': ' .$exception->getHint())); + $this->emit('\OC\Updater', 'failure', [$exception->getMessage() . ': ' .$exception->getHint()]); $success = false; } catch (\Exception $exception) { $this->log->logException($exception, ['app' => 'core']); - $this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage())); + $this->emit('\OC\Updater', 'failure', [get_class($exception) . ': ' .$exception->getMessage()]); $success = false; } - $this->emit('\OC\Updater', 'updateEnd', array($success)); + $this->emit('\OC\Updater', 'updateEnd', [$success]); if(!$wasMaintenanceModeEnabled && $success) { $this->config->setSystemValue('maintenance', false); @@ -324,7 +324,7 @@ class Updater extends BasicEmitter { $this->includePreUpdate($appId); } if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) { - $this->emit('\OC\Updater', 'appSimulateUpdate', array($appId)); + $this->emit('\OC\Updater', 'appSimulateUpdate', [$appId]); \OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml'); } } @@ -349,15 +349,15 @@ class Updater extends BasicEmitter { */ protected function doAppUpgrade() { $apps = \OC_App::getEnabledApps(); - $priorityTypes = array('authentication', 'filesystem', 'logging'); + $priorityTypes = ['authentication', 'filesystem', 'logging']; $pseudoOtherType = 'other'; - $stacks = array($pseudoOtherType => array()); + $stacks = [$pseudoOtherType => []]; foreach ($apps as $appId) { $priorityType = false; foreach ($priorityTypes as $type) { if(!isset($stacks[$type])) { - $stacks[$type] = array(); + $stacks[$type] = []; } if (\OC_App::isType($appId, [$type])) { $stacks[$type][] = $appId; @@ -409,7 +409,7 @@ class Updater extends BasicEmitter { throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update'); } \OC::$server->getAppManager()->disableApp($app, true); - $this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app)); + $this->emit('\OC\Updater', 'incompatibleAppDisabled', [$app]); } // no need to disable any app in case this is a non-core upgrade if (!$isCoreUpgrade) { |