aboutsummaryrefslogtreecommitdiffstats
path: root/core/Middleware/TwoFactorMiddleware.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-23 23:03:56 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-06-23 23:03:56 +0330
commite98cf3c37481ef92fbb2f50de16ea00d2958f3c3 (patch)
treecba89a58c0a9634e8d687a4d99a29b4158fa6aa8 /core/Middleware/TwoFactorMiddleware.php
parent877ddd28277e6bd263832209f4d22e713b4bdd87 (diff)
downloadnextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.tar.gz
nextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.zip
Uses PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/Middleware/TwoFactorMiddleware.php')
-rw-r--r--core/Middleware/TwoFactorMiddleware.php40
1 files changed, 8 insertions, 32 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php
index 0ea21ce78de..f421528dff7 100644
--- a/core/Middleware/TwoFactorMiddleware.php
+++ b/core/Middleware/TwoFactorMiddleware.php
@@ -46,38 +46,14 @@ use OCP\IURLGenerator;
use OCP\IUser;
class TwoFactorMiddleware extends Middleware {
- /** @var Manager */
- private $twoFactorManager;
-
- /** @var Session */
- private $userSession;
-
- /** @var ISession */
- private $session;
-
- /** @var IURLGenerator */
- private $urlGenerator;
-
- /** @var IControllerMethodReflector */
- private $reflector;
-
- /** @var IRequest */
- private $request;
-
- /**
- * @param Manager $twoFactorManager
- * @param Session $userSession
- * @param ISession $session
- * @param IURLGenerator $urlGenerator
- */
- public function __construct(Manager $twoFactorManager, Session $userSession, ISession $session,
- IURLGenerator $urlGenerator, IControllerMethodReflector $reflector, IRequest $request) {
- $this->twoFactorManager = $twoFactorManager;
- $this->userSession = $userSession;
- $this->session = $session;
- $this->urlGenerator = $urlGenerator;
- $this->reflector = $reflector;
- $this->request = $request;
+ public function __construct(
+ private Manager $twoFactorManager,
+ private Session $userSession,
+ private ISession $session,
+ private IURLGenerator $urlGenerator,
+ private IControllerMethodReflector $reflector,
+ private IRequest $request,
+ ) {
}
/**