Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 15:19:56 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 15:19:56 +0300
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/oauth2
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
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/oauth2')
-rw-r--r--apps/oauth2/lib/Controller/SettingsController.php1
-rw-r--r--apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php3
-rw-r--r--apps/oauth2/lib/Exceptions/ClientNotFoundException.php3
-rw-r--r--apps/oauth2/lib/Migration/SetTokenExpiration.php3
4 files changed, 5 insertions, 5 deletions
diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php
index 038509786d5..89685bbee19 100644
--- a/apps/oauth2/lib/Controller/SettingsController.php
+++ b/apps/oauth2/lib/Controller/SettingsController.php
@@ -81,7 +81,6 @@ class SettingsController extends Controller {
public function addClient(string $name,
string $redirectUri): JSONResponse {
-
if (filter_var($redirectUri, FILTER_VALIDATE_URL) === false) {
return new JSONResponse(['message' => $this->l->t('Your redirect URL needs to be a full URL for example: https://yourdomain.com/path')], Http::STATUS_BAD_REQUEST);
}
diff --git a/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php b/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php
index 66c982a29db..6033568f15f 100644
--- a/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php
+++ b/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php
@@ -26,4 +26,5 @@ declare(strict_types=1);
namespace OCA\OAuth2\Exceptions;
-class AccessTokenNotFoundException extends \Exception {}
+class AccessTokenNotFoundException extends \Exception {
+}
diff --git a/apps/oauth2/lib/Exceptions/ClientNotFoundException.php b/apps/oauth2/lib/Exceptions/ClientNotFoundException.php
index 91fcaa99893..7f7dad04320 100644
--- a/apps/oauth2/lib/Exceptions/ClientNotFoundException.php
+++ b/apps/oauth2/lib/Exceptions/ClientNotFoundException.php
@@ -26,4 +26,5 @@ declare(strict_types=1);
namespace OCA\OAuth2\Exceptions;
-class ClientNotFoundException extends \Exception {}
+class ClientNotFoundException extends \Exception {
+}
diff --git a/apps/oauth2/lib/Migration/SetTokenExpiration.php b/apps/oauth2/lib/Migration/SetTokenExpiration.php
index 6332ae85ca1..b9538ee4ab5 100644
--- a/apps/oauth2/lib/Migration/SetTokenExpiration.php
+++ b/apps/oauth2/lib/Migration/SetTokenExpiration.php
@@ -64,7 +64,7 @@ class SetTokenExpiration implements IRepairStep {
$cursor = $qb->execute();
- while($row = $cursor->fetch()) {
+ while ($row = $cursor->fetch()) {
$token = AccessToken::fromRow($row);
try {
$appToken = $this->tokenProvider->getTokenById($token->getTokenId());
@@ -76,5 +76,4 @@ class SetTokenExpiration implements IRepairStep {
}
$cursor->closeCursor();
}
-
}