77use DOMElement ;
88use SimpleSAML \SAML2 \Assert \Assert ;
99use SimpleSAML \SAML2 \Constants as C ;
10- use SimpleSAML \SAML2 \Type \AnyURIListValue ;
10+ use SimpleSAML \SAML2 \Type \SAMLAnyURIListValue ;
1111use SimpleSAML \SAML2 \Type \SAMLAnyURIValue ;
1212use SimpleSAML \SAML2 \Type \SAMLDateTimeValue ;
1313use SimpleSAML \XML \ExtendableAttributesTrait ;
1414use SimpleSAML \XMLSchema \Type \DurationValue ;
1515use SimpleSAML \XMLSchema \Type \IDValue ;
1616use SimpleSAML \XMLSchema \XML \Constants \NS ;
1717
18- use function strval ;
19-
2018/**
2119 * Class representing SAML2 RoleDescriptorType.
2220 *
@@ -34,7 +32,7 @@ abstract class AbstractRoleDescriptorType extends AbstractMetadataDocument
3432 /**
3533 * Initialize a RoleDescriptor.
3634 *
37- * @param \SimpleSAML\SAML2\Type\AnyURIListValue $protocolSupportEnumeration
35+ * @param \SimpleSAML\SAML2\Type\SAMLAnyURIListValue $protocolSupportEnumeration
3836 * A set of URI specifying the protocols supported.
3937 * @param \SimpleSAML\XMLSchema\Type\IDValue|null $ID The ID for this document. Defaults to null.
4038 * @param \SimpleSAML\SAML2\Type\SAMLDateTimeValue|null $validUntil Unix time of validity for this document.
@@ -53,7 +51,7 @@ abstract class AbstractRoleDescriptorType extends AbstractMetadataDocument
5351 * @param list<\SimpleSAML\XML\Attribute> $namespacedAttributes
5452 */
5553 public function __construct (
56- protected AnyURIListValue $ protocolSupportEnumeration ,
54+ protected SAMLAnyURIListValue $ protocolSupportEnumeration ,
5755 ?IDValue $ ID = null ,
5856 ?SAMLDateTimeValue $ validUntil = null ,
5957 ?DurationValue $ cacheDuration = null ,
@@ -97,9 +95,9 @@ public function getErrorURL(): ?SAMLAnyURIValue
9795 /**
9896 * Collect the value of the protocolSupportEnumeration property.
9997 *
100- * @return \SimpleSAML\SAML2\Type\AnyURIListValue
98+ * @return \SimpleSAML\SAML2\Type\SAMLAnyURIListValue
10199 */
102- public function getProtocolSupportEnumeration (): AnyURIListValue
100+ public function getProtocolSupportEnumeration (): SAMLAnyURIListValue
103101 {
104102 return $ this ->protocolSupportEnumeration ;
105103 }
@@ -147,10 +145,10 @@ public function getKeyDescriptor(): array
147145 public function toUnsignedXML (?DOMElement $ parent = null ): DOMElement
148146 {
149147 $ e = parent ::toUnsignedXML ($ parent );
150- $ e ->setAttribute ('protocolSupportEnumeration ' , strval ( $ this ->getProtocolSupportEnumeration ()));
148+ $ e ->setAttribute ('protocolSupportEnumeration ' , $ this ->getProtocolSupportEnumeration ()-> getValue ( ));
151149
152150 if ($ this ->getErrorURL () !== null ) {
153- $ e ->setAttribute ('errorURL ' , strval ( $ this ->getErrorURL ()));
151+ $ e ->setAttribute ('errorURL ' , $ this ->getErrorURL ()-> getValue ( ));
154152 }
155153
156154 foreach ($ this ->getKeyDescriptor () as $ kd ) {
0 commit comments