diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /lib/private/Updater.php | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff) | |
download | nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip |
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index e94f36554d7..edbf43ea972 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -109,7 +109,7 @@ class Updater extends BasicEmitter { $wasMaintenanceModeEnabled = $this->config->getSystemValueBool('maintenance'); - if(!$wasMaintenanceModeEnabled) { + if (!$wasMaintenanceModeEnabled) { $this->config->setSystemValue('maintenance', true); $this->emit('\OC\Updater', 'maintenanceEnabled'); } @@ -141,7 +141,7 @@ class Updater extends BasicEmitter { $this->emit('\OC\Updater', 'updateEnd', [$success]); - if(!$wasMaintenanceModeEnabled && $success) { + if (!$wasMaintenanceModeEnabled && $success) { $this->config->setSystemValue('maintenance', false); $this->emit('\OC\Updater', 'maintenanceDisabled'); } else { @@ -279,7 +279,7 @@ class Updater extends BasicEmitter { $this->config->setAppValue('core', 'lastupdatedat', 0); // Check for code integrity if not disabled - if(\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) { + if (\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) { $this->emit('\OC\Updater', 'startCheckCodeIntegrity'); $this->checker->runInstanceVerification(); $this->emit('\OC\Updater', 'finishedCheckCodeIntegrity'); @@ -356,7 +356,7 @@ class Updater extends BasicEmitter { foreach ($apps as $appId) { $priorityType = false; foreach ($priorityTypes as $type) { - if(!isset($stacks[$type])) { + if (!isset($stacks[$type])) { $stacks[$type] = []; } if (\OC_App::isType($appId, [$type])) { @@ -376,7 +376,7 @@ class Updater extends BasicEmitter { \OC_App::updateApp($appId); $this->emit('\OC\Updater', 'appUpgrade', [$appId, \OC_App::getAppVersion($appId)]); } - if($type !== $pseudoOtherType) { + if ($type !== $pseudoOtherType) { // load authentication, filesystem and logging apps after // upgrading them. Other apps my need to rely on modifying // user and/or filesystem aspects. @@ -404,7 +404,7 @@ class Updater extends BasicEmitter { foreach ($apps as $app) { // check if the app is compatible with this version of ownCloud $info = OC_App::getAppInfo($app); - if($info === null || !OC_App::isAppCompatible($version, $info)) { + if ($info === null || !OC_App::isAppCompatible($version, $info)) { if ($appManager->isShipped($app)) { throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update'); } @@ -445,7 +445,7 @@ class Updater extends BasicEmitter { * @throws \Exception */ private function upgradeAppStoreApps(array $disabledApps, $reenable = false) { - foreach($disabledApps as $app) { + foreach ($disabledApps as $app) { try { $this->emit('\OC\Updater', 'checkAppStoreAppBefore', [$app]); if ($this->installer->isUpdateAvailable($app)) { @@ -621,7 +621,5 @@ class Updater extends BasicEmitter { $this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($log) { $log->info('\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check', ['app' => 'updater']); }); - } - } |