From d3b14d21dcb4217dfd09f5998fb3b77657d87e7f Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sun, 3 Feb 2019 20:23:30 +0100
Subject: [PATCH] Fixes for modules/authwindowslive

---
 modules/authwindowslive/lib/Auth/Source/LiveID.php | 9 +++++++--
 modules/authwindowslive/www/linkback.php           | 1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/authwindowslive/lib/Auth/Source/LiveID.php b/modules/authwindowslive/lib/Auth/Source/LiveID.php
index 3f4dc5446..1b64be62f 100644
--- a/modules/authwindowslive/lib/Auth/Source/LiveID.php
+++ b/modules/authwindowslive/lib/Auth/Source/LiveID.php
@@ -21,9 +21,13 @@ class LiveID extends \SimpleSAML\Auth\Source
      */
     const AUTHID = 'authwindowslive:AuthId';
 
+    /** @var string */
     private $key;
+
+    /** @var string */
     private $secret;
 
+
     /**
      * Constructor for this authentication source.
      *
@@ -57,6 +61,7 @@ class LiveID extends \SimpleSAML\Auth\Source
      * Log-in using LiveID platform
      *
      * @param array &$state  Information about the current authentication.
+     * @return void
      */
     public function authenticate(&$state)
     {
@@ -85,8 +90,8 @@ class LiveID extends \SimpleSAML\Auth\Source
     }
 
     /**
-     * @param $state
-     *
+     * @param array &$state
+     * @return void
      * @throws \Exception
      */
     public function finalStep(&$state)
diff --git a/modules/authwindowslive/www/linkback.php b/modules/authwindowslive/www/linkback.php
index 758bdd215..3800cd180 100644
--- a/modules/authwindowslive/www/linkback.php
+++ b/modules/authwindowslive/www/linkback.php
@@ -39,6 +39,7 @@ if (array_key_exists('code', $_REQUEST)) {
 assert(array_key_exists(\SimpleSAML\Module\authwindowslive\Auth\Source\LiveID::AUTHID, $state));
 $sourceId = $state[\SimpleSAML\Module\authwindowslive\Auth\Source\LiveID::AUTHID];
 
+/** @var \SimpleSAML\Module\authwindowslive\Auth\Source\LiveID|null $source */
 $source = \SimpleSAML\Auth\Source::getById($sourceId);
 if ($source === null) {
     throw new \Exception('Could not find authentication source with id '.$sourceId);
-- 
GitLab