@@ -28,19 +28,19 @@ class IdPMetadataParser
28
28
* make sure to validate it properly before use it in the parseRemoteXML
29
29
* method in order to avoid security issues like SSRF attacks.
30
30
*
31
- * @param string $url URL where the IdP metadata is published
32
- * @param string $entityId Entity Id of the desired IdP, if no
33
- * entity Id is provided and the XML
34
- * metadata contains more than one
35
- * IDPSSODescriptor, the first is returned
36
- * @param string $desiredNameIdFormat If available on IdP metadata, use that nameIdFormat
37
- * @param string $desiredSSOBinding Parse specific binding SSO endpoint
38
- * @param string $desiredSLOBinding Parse specific binding SLO endpoint
39
- * @param bool $validatePeer Enable or disable validate peer SSL certificate
31
+ * @param string $url URL where the IdP metadata is published
32
+ * @param string|null $entityId Entity Id of the desired IdP, if no
33
+ * entity Id is provided and the XML
34
+ * metadata contains more than one
35
+ * IDPSSODescriptor, the first is returned
36
+ * @param string|null $desiredNameIdFormat If available on IdP metadata, use that nameIdFormat
37
+ * @param string|null $desiredSSOBinding Parse specific binding SSO endpoint
38
+ * @param string|null $desiredSLOBinding Parse specific binding SLO endpoint
39
+ * @param bool $validatePeer Enable or disable validate peer SSL certificate
40
40
*
41
41
* @return array metadata info in php-saml settings format
42
42
*/
43
- public static function parseRemoteXML ($ url , $ entityId = null , $ desiredNameIdFormat = null , $ desiredSSOBinding = Constants::BINDING_HTTP_REDIRECT , $ desiredSLOBinding = Constants::BINDING_HTTP_REDIRECT , $ validatePeer = false )
43
+ public static function parseRemoteXML ($ url , string | null $ entityId, string | null $ desiredNameIdFormat , $ desiredSSOBinding = Constants::BINDING_HTTP_REDIRECT , $ desiredSLOBinding = Constants::BINDING_HTTP_REDIRECT , $ validatePeer = false )
44
44
{
45
45
$ metadataInfo = array ();
46
46
@@ -70,18 +70,18 @@ public static function parseRemoteXML($url, $entityId = null, $desiredNameIdForm
70
70
/**
71
71
* Get IdP Metadata Info from File
72
72
*
73
- * @param string $filepath File path
74
- * @param string $entityId Entity Id of the desired IdP, if no
75
- * entity Id is provided and the XML
76
- * metadata contains more than one
77
- * IDPSSODescriptor, the first is returned
78
- * @param string $desiredNameIdFormat If available on IdP metadata, use that nameIdFormat
79
- * @param string $desiredSSOBinding Parse specific binding SSO endpoint
80
- * @param string $desiredSLOBinding Parse specific binding SLO endpoint
73
+ * @param string $filepath File path
74
+ * @param string|null $entityId Entity Id of the desired IdP, if no
75
+ * entity Id is provided and the XML
76
+ * metadata contains more than one
77
+ * IDPSSODescriptor, the first is returned
78
+ * @param string|null $desiredNameIdFormat If available on IdP metadata, use that nameIdFormat
79
+ * @param string $desiredSSOBinding Parse specific binding SSO endpoint
80
+ * @param string $desiredSLOBinding Parse specific binding SLO endpoint
81
81
*
82
82
* @return array metadata info in php-saml settings format
83
83
*/
84
- public static function parseFileXML ($ filepath , $ entityId = null , $ desiredNameIdFormat = null , $ desiredSSOBinding = Constants::BINDING_HTTP_REDIRECT , $ desiredSLOBinding = Constants::BINDING_HTTP_REDIRECT )
84
+ public static function parseFileXML ($ filepath , string | null $ entityId, string | null $ desiredNameIdFormat , $ desiredSSOBinding = Constants::BINDING_HTTP_REDIRECT , $ desiredSLOBinding = Constants::BINDING_HTTP_REDIRECT )
85
85
{
86
86
$ metadataInfo = array ();
87
87
@@ -99,20 +99,20 @@ public static function parseFileXML($filepath, $entityId = null, $desiredNameIdF
99
99
/**
100
100
* Get IdP Metadata Info from URL
101
101
*
102
- * @param string $xml XML that contains IdP metadata
103
- * @param string $entityId Entity Id of the desired IdP, if no
104
- * entity Id is provided and the XML
105
- * metadata contains more than one
106
- * IDPSSODescriptor, the first is returned
107
- * @param string $desiredNameIdFormat If available on IdP metadata, use that nameIdFormat
108
- * @param string $desiredSSOBinding Parse specific binding SSO endpoint
109
- * @param string $desiredSLOBinding Parse specific binding SLO endpoint
102
+ * @param string $xml XML that contains IdP metadata
103
+ * @param string|null $entityId Entity Id of the desired IdP, if no
104
+ * entity Id is provided and the XML
105
+ * metadata contains more than one
106
+ * IDPSSODescriptor, the first is returned
107
+ * @param string|null $desiredNameIdFormat If available on IdP metadata, use that nameIdFormat
108
+ * @param string $desiredSSOBinding Parse specific binding SSO endpoint
109
+ * @param string $desiredSLOBinding Parse specific binding SLO endpoint
110
110
*
111
111
* @return array metadata info in php-saml settings format
112
112
*
113
113
* @throws Exception
114
114
*/
115
- public static function parseXML ($ xml , $ entityId = null , $ desiredNameIdFormat = null , $ desiredSSOBinding = Constants::BINDING_HTTP_REDIRECT , $ desiredSLOBinding = Constants::BINDING_HTTP_REDIRECT )
115
+ public static function parseXML ($ xml , string | null $ entityId, string | null $ desiredNameIdFormat , $ desiredSSOBinding = Constants::BINDING_HTTP_REDIRECT , $ desiredSLOBinding = Constants::BINDING_HTTP_REDIRECT )
116
116
{
117
117
$ metadataInfo = array ();
118
118
0 commit comments