From a82603181484bfaf735e35d1905617c06572390b Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Sat, 2 Feb 2019 20:40:28 +0100 Subject: [PATCH] Fixes for lib/SimpleSAML/HTTP --- lib/SimpleSAML/HTTP/Router.php | 21 ++++++++++++--------- lib/SimpleSAML/HTTP/RunnableResponse.php | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/SimpleSAML/HTTP/Router.php b/lib/SimpleSAML/HTTP/Router.php index e537092a9..699d3a752 100644 --- a/lib/SimpleSAML/HTTP/Router.php +++ b/lib/SimpleSAML/HTTP/Router.php @@ -20,11 +20,11 @@ use Symfony\Component\Routing\RequestContext; */ class Router { - + /** @var ArgumentResolver */ protected $arguments; - /** @var \SimpleSAML\Configuration */ - protected $config; + /** @var \SimpleSAML\Configuration|null */ + protected $config = null; /** @var RequestContext */ protected $context; @@ -32,17 +32,17 @@ class Router /** @var EventDispatcher */ protected $dispatcher; - /** @var Request */ - protected $request; + /** @var Request|null */ + protected $request = null; /** @var \SimpleSAML\Module\ControllerResolver */ protected $resolver; - /** @var \SimpleSAML\Session */ - protected $session; + /** @var \SimpleSAML\Session|null */ + protected $session = null; - /** @var RequestStack */ - protected $stack; + /** @var RequestStack|null */ + protected $stack = null; /** @@ -94,6 +94,7 @@ class Router * Send a given response to the browser. * * @param Response $response The response to send. + * @return void */ public function send(Response $response) { @@ -106,6 +107,7 @@ class Router * Set the configuration to use by the controller. * * @param \SimpleSAML\Configuration $config + * @return void */ public function setConfiguration(Configuration $config) { @@ -118,6 +120,7 @@ class Router * Set the session to use by the controller. * * @param \SimpleSAML\Session $session + * @return void */ public function setSession(Session $session) { diff --git a/lib/SimpleSAML/HTTP/RunnableResponse.php b/lib/SimpleSAML/HTTP/RunnableResponse.php index ab9fc6c5f..2692c75f1 100644 --- a/lib/SimpleSAML/HTTP/RunnableResponse.php +++ b/lib/SimpleSAML/HTTP/RunnableResponse.php @@ -60,7 +60,7 @@ class RunnableResponse extends Response /** * "Send" this response by actually running the callable. * - * @return mixed + * @return self */ public function send() { -- GitLab