Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public static function fromXML(DOMElement $xml): static |
||
28 | { |
||
29 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
30 | Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class); |
||
31 | |||
32 | $parameter = Parameters::getChildrenOfClass($xml); |
||
33 | Assert::maxCount($parameter, 1, TooManyElementsException::class); |
||
34 | |||
35 | return new static( |
||
36 | self::getOptionalAttribute($xml, 'Algorithm', null), |
||
|
|||
37 | array_pop($parameter), |
||
38 | ); |
||
41 |