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/Repair/MoveUpdaterStepFile.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/Repair/MoveUpdaterStepFile.php')
-rw-r--r-- | lib/private/Repair/MoveUpdaterStepFile.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/Repair/MoveUpdaterStepFile.php b/lib/private/Repair/MoveUpdaterStepFile.php index 481cff47e15..6be54bbb576 100644 --- a/lib/private/Repair/MoveUpdaterStepFile.php +++ b/lib/private/Repair/MoveUpdaterStepFile.php @@ -43,24 +43,23 @@ class MoveUpdaterStepFile implements IRepairStep { } public function run(IOutput $output) { - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); $instanceId = $this->config->getSystemValue('instanceid', null); - if(!is_string($instanceId) || empty($instanceId)) { + if (!is_string($instanceId) || empty($instanceId)) { return; } $updaterFolderPath = $dataDir . '/updater-' . $instanceId; $stepFile = $updaterFolderPath . '/.step'; - if(file_exists($stepFile)) { + if (file_exists($stepFile)) { $output->info('.step file exists'); $previousStepFile = $updaterFolderPath . '/.step-previous-update'; // cleanup - if(file_exists($previousStepFile)) { - if(\OC_Helper::rmdirr($previousStepFile)) { + if (file_exists($previousStepFile)) { + if (\OC_Helper::rmdirr($previousStepFile)) { $output->info('.step-previous-update removed'); } else { $output->info('.step-previous-update can\'t be removed - abort move of .step file'); @@ -69,7 +68,7 @@ class MoveUpdaterStepFile implements IRepairStep { } // move step file - if(rename($stepFile, $previousStepFile)) { + if (rename($stepFile, $previousStepFile)) { $output->info('.step file moved to .step-previous-update'); } else { $output->warning('.step file can\'t be moved'); |