Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public static function fromXML(DOMElement $xml): static |
||
32 | { |
||
33 | Assert::same($xml->localName, static::LOCALNAME, InvalidDOMElementException::class); |
||
34 | Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); |
||
35 | |||
36 | return new static( |
||
37 | self::getAttribute($xml, 'message'), |
||
38 | self::getOptionalAttribute($xml, 'name'), |
||
39 | self::getAttributesNSFromXML($xml), |
||
40 | ); |
||
43 |