From 103f08d9814d888386ec01def7709b7d20ed15d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no>
Date: Tue, 11 Dec 2018 12:39:37 +0100
Subject: [PATCH] bugfix: "const" is a keyword, so we can't name classes like
 that. Also, the name of the class must be exactly the same as the name of the
 file, according to the PSR-4 standard.

---
 modules/adfs/lib/SAML2/XML/fed/{Const.php => Constants.php} | 4 ++--
 modules/adfs/lib/SAML2/XML/fed/SecurityTokenServiceType.php | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename modules/adfs/lib/SAML2/XML/fed/{Const.php => Constants.php} (78%)

diff --git a/modules/adfs/lib/SAML2/XML/fed/Const.php b/modules/adfs/lib/SAML2/XML/fed/Constants.php
similarity index 78%
rename from modules/adfs/lib/SAML2/XML/fed/Const.php
rename to modules/adfs/lib/SAML2/XML/fed/Constants.php
index 1fd7fb15e..db326b348 100644
--- a/modules/adfs/lib/SAML2/XML/fed/Const.php
+++ b/modules/adfs/lib/SAML2/XML/fed/Constants.php
@@ -3,12 +3,12 @@
 namespace SimpleSAML\Module\adfs\SAML2\XML\fed;
 
 /**
- * Class representing fed Constants.
+ * Class holding constants relevant for ADFS.
  *
  * @package SimpleSAMLphp
  */
 
-class FedConst
+class Constants
 {
     /**
      * The namespace for WS-FED protocol.
diff --git a/modules/adfs/lib/SAML2/XML/fed/SecurityTokenServiceType.php b/modules/adfs/lib/SAML2/XML/fed/SecurityTokenServiceType.php
index 55a802d50..10aa5e41e 100644
--- a/modules/adfs/lib/SAML2/XML/fed/SecurityTokenServiceType.php
+++ b/modules/adfs/lib/SAML2/XML/fed/SecurityTokenServiceType.php
@@ -15,7 +15,7 @@ class SecurityTokenServiceType extends \SAML2\XML\md\RoleDescriptor
      *
      * @var array
      */
-    public $protocolSupportEnumeration = [FedConst::NS_FED];
+    public $protocolSupportEnumeration = [Constants::NS_FED];
 
     /**
      * The Location of Services.
@@ -48,7 +48,7 @@ class SecurityTokenServiceType extends \SAML2\XML\md\RoleDescriptor
         assert(is_string($this->Location));
 
         $e = parent::toXML($parent);
-        $e->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:fed', FedConst::NS_FED);
+        $e->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:fed', Constants::NS_FED);
         $e->setAttributeNS(\SAML2\Constants::NS_XSI, 'xsi:type', 'fed:SecurityTokenServiceType');
         TokenTypesOffered::appendXML($e);
         Endpoint::appendXML($e, 'SecurityTokenServiceEndpoint', $this->Location);
-- 
GitLab