| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public static function fromXML(DOMElement $xml): static |
||
| 31 | { |
||
| 32 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
| 33 | Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class); |
||
| 34 | |||
| 35 | $proxyTicket = ProxyTicket::getChildrenOfClass($xml); |
||
| 36 | Assert::count( |
||
| 37 | $proxyTicket, |
||
| 38 | 1, |
||
| 39 | 'Exactly one <cas:proxyTicket> must be specified.', |
||
| 40 | MissingElementException::class, |
||
| 41 | ); |
||
| 42 | |||
| 43 | return new static($proxyTicket[0]); |
||
| 44 | } |
||
| 46 |