66
77use DOMElement ;
88use SimpleSAML \Assert \Assert ;
9- use SimpleSAML \SAML11 \Type \SAMLStringValue ;
9+ use SimpleSAML \SAML11 \Type \{ DecisionTypeValue , SAMLStringValue } ;
1010use SimpleSAML \XML \Exception \{
1111 InvalidDOMElementException ,
1212 MissingElementException ,
@@ -28,7 +28,7 @@ abstract class AbstractAuthorizationDecisionStatementType extends AbstractSubjec
2828 * Initialize a saml:AuthorizationDecisionStatementType from scratch
2929 *
3030 * @param \SimpleSAML\XML\Type\AnyURIValue $resource
31- * @param \SimpleSAML\SAML11\XML\saml\DecisionTypeEnum $decision
31+ * @param \SimpleSAML\SAML11\Type\DecisionTypeValue $decision
3232 * @param \SimpleSAML\SAML11\XML\saml\Subject $subject
3333 * @param array<\SimpleSAML\SAML11\XML\saml\Action> $action
3434 * @param \SimpleSAML\SAML11\XML\saml\Evidence|null $evidence
@@ -37,7 +37,7 @@ final public function __construct(
3737 Subject $ subject ,
3838 // Uses the base AnyURIValue because the SAML specification allows this attribute to be an empty string
3939 protected AnyURIValue $ resource ,
40- protected DecisionTypeEnum $ decision ,
40+ protected DecisionTypeValue $ decision ,
4141 protected array $ action = [],
4242 protected ?Evidence $ evidence = null ,
4343 ) {
@@ -62,9 +62,9 @@ public function getResource(): AnyURIValue
6262 /**
6363 * Collect the value of the decision-property
6464 *
65- * @return \SimpleSAML\SAML11\XML\saml\DecisionTypeEnum
65+ * @return \SimpleSAML\SAML11\Type\DecisionTypeValue
6666 */
67- public function getDecision (): DecisionTypeEnum
67+ public function getDecision (): DecisionTypeValue
6868 {
6969 return $ this ->decision ;
7070 }
@@ -116,9 +116,7 @@ public static function fromXML(DOMElement $xml): static
116116 return new static (
117117 array_pop ($ subject ),
118118 self ::getAttribute ($ xml , 'Resource ' , AnyURIValue::class),
119- DecisionTypeEnum::from (
120- strval (self ::getAttribute ($ xml , 'Decision ' , SAMLStringValue::class)),
121- ),
119+ self ::getAttribute ($ xml , 'Decision ' , DecisionTypeValue::class),
122120 Action::getChildrenOfClass ($ xml ),
123121 array_pop ($ evidence ),
124122 );
@@ -137,7 +135,7 @@ public function toXML(?DOMElement $parent = null): DOMElement
137135 $ e = parent ::toXML ($ parent );
138136
139137 $ e ->setAttribute ('Resource ' , strval ($ this ->getResource ()));
140- $ e ->setAttribute ('Decision ' , $ this ->getDecision ()-> value );
138+ $ e ->setAttribute ('Decision ' , strval ( $ this ->getDecision ()) );
141139
142140 foreach ($ this ->getAction () as $ action ) {
143141 $ action ->toXML ($ e );
0 commit comments