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