Total Complexity | 2 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | final class OneTimeUse extends AbstractConditionType |
||
18 | { |
||
19 | /** |
||
20 | * Convert XML into an OneTimeUse |
||
21 | * |
||
22 | * @param \DOMElement $xml The XML element we should load |
||
23 | * @return static |
||
24 | * |
||
25 | * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException |
||
26 | * If the qualified name of the supplied element is wrong |
||
27 | */ |
||
28 | public static function fromXML(DOMElement $xml): static |
||
29 | { |
||
30 | Assert::same($xml->localName, 'OneTimeUse', InvalidDOMElementException::class); |
||
31 | Assert::same($xml->namespaceURI, OneTimeUse::NS, InvalidDOMElementException::class); |
||
32 | |||
33 | return new static(); |
||
34 | } |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Convert this OneTimeUse to XML. |
||
39 | * |
||
40 | * @param \DOMElement $parent The element we are converting to XML. |
||
41 | * @return \DOMElement The XML element after adding the data corresponding to this OneTimeUse. |
||
42 | */ |
||
43 | public function toXML(DOMElement $parent = null): DOMElement |
||
46 | } |
||
47 | } |
||
48 |