| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public static function fromXML(DOMElement $xml): static |
||
| 26 | { |
||
| 27 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
| 28 | Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); |
||
| 29 | |||
| 30 | return new static( |
||
| 31 | StringValue::fromString($xml->textContent), |
||
| 32 | self::getAttributesNSFromXML($xml), |
||
| 33 | ); |
||
| 36 |