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 /apps/settings/lib/BackgroundJobs | |
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 'apps/settings/lib/BackgroundJobs')
-rw-r--r-- | apps/settings/lib/BackgroundJobs/VerifyUserData.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/settings/lib/BackgroundJobs/VerifyUserData.php b/apps/settings/lib/BackgroundJobs/VerifyUserData.php index a5c46c603bf..e77d95ff4d9 100644 --- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php +++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php @@ -100,7 +100,6 @@ class VerifyUserData extends Job { * @param ILogger|null $logger */ public function execute($jobList, ILogger $logger = null) { - if ($this->shouldRun($this->argument)) { parent::execute($jobList, $logger); $jobList->remove($this, $this->argument); @@ -110,14 +109,12 @@ class VerifyUserData extends Job { $this->resetVerificationState(); } } - } protected function run($argument) { - $try = (int)$argument['try'] + 1; - switch($argument['type']) { + switch ($argument['type']) { case AccountManager::PROPERTY_WEBSITE: $result = $this->verifyWebsite($argument); break; @@ -143,7 +140,6 @@ class VerifyUserData extends Job { * @return bool true if we could check the verification code, otherwise false */ protected function verifyWebsite(array $argument) { - $result = false; $url = rtrim($argument['data'], '/') . '/.well-known/' . 'CloudIdVerificationCode.txt'; @@ -188,7 +184,7 @@ class VerifyUserData extends Job { * @return bool true if we could check the verification code, otherwise false */ protected function verifyViaLookupServer(array $argument, $dataType) { - if(empty($this->lookupServerUrl) || + if (empty($this->lookupServerUrl) || $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' || $this->config->getSystemValue('has_internet_connection', true) === false) { return false; @@ -249,7 +245,6 @@ class VerifyUserData extends Job { if (is_array($body) && isset($body['federationId']) && $body['federationId'] === $cloudId) { return $body; } - } catch (\Exception $e) { // do nothing, we will just re-try later } @@ -299,5 +294,4 @@ class VerifyUserData extends Job { $this->accountManager->updateUser($user, $accountData); } } - } |