summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-08-29 09:54:45 +0200
committerGitHub <noreply@github.com>2019-08-29 09:54:45 +0200
commit130fdf50061315b377c6d8916902326d614f66b0 (patch)
treec5654118b353564b5fe2868a7317295d42443f50 /lib
parentc816dbc7f9f25eab3e7e8fe72e42b48037ad134c (diff)
parent3f12ec95f0c220dfcfa9d495f981fee6ded4b002 (diff)
downloadnextcloud-server-130fdf50061315b377c6d8916902326d614f66b0.tar.gz
nextcloud-server-130fdf50061315b377c6d8916902326d614f66b0.zip
Merge pull request #16913 from nextcloud/fix/declare_members
SessionMiddleware: declare session property
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php1
-rw-r--r--lib/private/AppFramework/Middleware/SessionMiddleware.php23
2 files changed, 6 insertions, 18 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 89ebc60b226..7f416c3ed90 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -284,7 +284,6 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$dispatcher->registerMiddleware(
new SessionMiddleware(
- $c->query(IRequest::class),
$c->query(IControllerMethodReflector::class),
$c->query(ISession::class)
)
diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php
index 7b52cc1e319..3cb60874b38 100644
--- a/lib/private/AppFramework/Middleware/SessionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php
@@ -34,25 +34,14 @@ use OCP\ISession;
class SessionMiddleware extends Middleware {
- /**
- * @var IRequest
- */
- private $request;
-
- /**
- * @var ControllerMethodReflector
- */
+ /** @var ControllerMethodReflector */
private $reflector;
- /**
- * @param IRequest $request
- * @param ControllerMethodReflector $reflector
- */
- public function __construct(IRequest $request,
- ControllerMethodReflector $reflector,
- ISession $session
-) {
- $this->request = $request;
+ /** @var ISession */
+ private $session;
+
+ public function __construct(ControllerMethodReflector $reflector,
+ ISession $session) {
$this->reflector = $reflector;
$this->session = $session;
}