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

---
 modules/cas/lib/Auth/Source/CAS.php | 5 ++++-
 modules/cas/www/linkback.php        | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/cas/lib/Auth/Source/CAS.php b/modules/cas/lib/Auth/Source/CAS.php
index 08f153c13..e4a231327 100644
--- a/modules/cas/lib/Auth/Source/CAS.php
+++ b/modules/cas/lib/Auth/Source/CAS.php
@@ -29,7 +29,7 @@ class CAS extends \SimpleSAML\Auth\Source
     private $ldapConfig;
 
     /**
-     * @var cas configuration
+     * @var array cas configuration
      */
     private $casConfig;
 
@@ -178,6 +178,7 @@ class CAS extends \SimpleSAML\Auth\Source
     /**
      * Called by linkback, to finish validate/ finish logging in.
      * @param array $state
+     * @return void
      */
     public function finalStep(&$state)
     {
@@ -213,6 +214,7 @@ class CAS extends \SimpleSAML\Auth\Source
      * Log-in using cas
      *
      * @param array &$state  Information about the current authentication.
+     * @return void
      */
     public function authenticate(&$state)
     {
@@ -241,6 +243,7 @@ class CAS extends \SimpleSAML\Auth\Source
      * showing the user a page, or redirecting, this function should return.
      *
      * @param array &$state  Information about the current logout operation.
+     * @return void
      */
     public function logout(&$state)
     {
diff --git a/modules/cas/www/linkback.php b/modules/cas/www/linkback.php
index 366583c8a..0b062a060 100644
--- a/modules/cas/www/linkback.php
+++ b/modules/cas/www/linkback.php
@@ -18,6 +18,7 @@ $state['cas:ticket'] = (string) $_GET['ticket'];
 assert(array_key_exists(\SimpleSAML\Module\cas\Auth\Source\CAS::AUTHID, $state));
 $sourceId = $state[\SimpleSAML\Module\cas\Auth\Source\CAS::AUTHID];
 
+/** @var \SimpleSAML\Module\cas\Auth\Source\CAS|null $source */
 $source = \SimpleSAML\Auth\Source::getById($sourceId);
 if ($source === null) {
     throw new \Exception('Could not find authentication source with id '.$sourceId);
-- 
GitLab