diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-04-10 16:38:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 16:38:23 +0200 |
commit | 1762a409f954fd9a66e7572704ea9ba7813601b4 (patch) | |
tree | 554d8f6bc93f397755d0a7c050041a9973e25396 /apps/settings/lib/Middleware/SubadminMiddleware.php | |
parent | eba3726e1e1b7ce0a98df4552cfdecfe05e0d63a (diff) | |
parent | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (diff) | |
download | nextcloud-server-1762a409f954fd9a66e7572704ea9ba7813601b4.tar.gz nextcloud-server-1762a409f954fd9a66e7572704ea9ba7813601b4.zip |
Merge pull request #20422 from nextcloud/techdebt/format-control-structs-classes-methods
Format control structures, classes, methods and function
Diffstat (limited to 'apps/settings/lib/Middleware/SubadminMiddleware.php')
-rw-r--r-- | apps/settings/lib/Middleware/SubadminMiddleware.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/settings/lib/Middleware/SubadminMiddleware.php b/apps/settings/lib/Middleware/SubadminMiddleware.php index ffc507e50e0..7fa30c8e26c 100644 --- a/apps/settings/lib/Middleware/SubadminMiddleware.php +++ b/apps/settings/lib/Middleware/SubadminMiddleware.php @@ -65,8 +65,8 @@ class SubadminMiddleware extends Middleware { * @throws \Exception */ public function beforeController($controller, $methodName) { - if(!$this->reflector->hasAnnotation('NoSubadminRequired')) { - if(!$this->isSubAdmin) { + if (!$this->reflector->hasAnnotation('NoSubadminRequired')) { + if (!$this->isSubAdmin) { throw new NotAdminException($this->l10n->t('Logged in user must be a subadmin')); } } @@ -81,7 +81,7 @@ class SubadminMiddleware extends Middleware { * @throws \Exception */ public function afterException($controller, $methodName, \Exception $exception) { - if($exception instanceof NotAdminException) { + if ($exception instanceof NotAdminException) { $response = new TemplateResponse('core', '403', [], 'guest'); $response->setStatus(Http::STATUS_FORBIDDEN); return $response; @@ -89,5 +89,4 @@ class SubadminMiddleware extends Middleware { throw $exception; } - } |