summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Controller
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/encryption/lib/Controller
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-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 'apps/encryption/lib/Controller')
-rw-r--r--apps/encryption/lib/Controller/RecoveryController.php3
-rw-r--r--apps/encryption/lib/Controller/SettingsController.php1
-rw-r--r--apps/encryption/lib/Controller/StatusController.php4
3 files changed, 1 insertions, 7 deletions
diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php
index 534e00e1b2e..509ff2a0391 100644
--- a/apps/encryption/lib/Controller/RecoveryController.php
+++ b/apps/encryption/lib/Controller/RecoveryController.php
@@ -161,7 +161,6 @@ class RecoveryController extends Controller {
*/
public function userSetRecovery($userEnableRecovery) {
if ($userEnableRecovery === '0' || $userEnableRecovery === '1') {
-
$result = $this->recovery->setRecoveryForUser($userEnableRecovery);
if ($result) {
@@ -180,7 +179,6 @@ class RecoveryController extends Controller {
]
);
}
-
}
return new DataResponse(
[
@@ -189,5 +187,4 @@ class RecoveryController extends Controller {
]
], Http::STATUS_BAD_REQUEST);
}
-
}
diff --git a/apps/encryption/lib/Controller/SettingsController.php b/apps/encryption/lib/Controller/SettingsController.php
index 545f544625b..f918f176767 100644
--- a/apps/encryption/lib/Controller/SettingsController.php
+++ b/apps/encryption/lib/Controller/SettingsController.php
@@ -150,7 +150,6 @@ class SettingsController extends Controller {
Http::STATUS_BAD_REQUEST
);
}
-
}
/**
diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php
index d3925e4482a..40159627b00 100644
--- a/apps/encryption/lib/Controller/StatusController.php
+++ b/apps/encryption/lib/Controller/StatusController.php
@@ -67,10 +67,9 @@ class StatusController extends Controller {
* @return DataResponse
*/
public function getStatus() {
-
$status = 'error';
$message = 'no valid init status';
- switch($this->session->getStatus()) {
+ switch ($this->session->getStatus()) {
case Session::INIT_EXECUTED:
$status = 'interactionNeeded';
$message = (string)$this->l->t(
@@ -102,5 +101,4 @@ class StatusController extends Controller {
]
);
}
-
}