| Conditions | 8 | 
| Paths | 8 | 
| Total Lines | 25 | 
| Code Lines | 21 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 26 | public static function fromXML(DOMElement $xml): object  | 
            ||
| 27 |     { | 
            ||
| 28 | Assert::same(  | 
            ||
| 29 | $xml->namespaceURI,  | 
            ||
| 30 | Constants::NS_SAMLP,  | 
            ||
| 31 | 'Unknown namespace of SAML message: ' . var_export($xml->namespaceURI, true)  | 
            ||
| 32 | );  | 
            ||
| 33 | |||
| 34 |         switch ($xml->localName) { | 
            ||
| 35 | case 'AttributeQuery':  | 
            ||
| 36 | return AttributeQuery::fromXML($xml);  | 
            ||
| 37 | case 'AuthnRequest':  | 
            ||
| 38 | return AuthnRequest::fromXML($xml);  | 
            ||
| 39 | case 'LogoutResponse':  | 
            ||
| 40 | return LogoutResponse::fromXML($xml);  | 
            ||
| 41 | case 'LogoutRequest':  | 
            ||
| 42 | return LogoutRequest::fromXML($xml);  | 
            ||
| 43 | case 'Response':  | 
            ||
| 44 | return Response::fromXML($xml);  | 
            ||
| 45 | case 'ArtifactResponse':  | 
            ||
| 46 | return ArtifactResponse::fromXML($xml);  | 
            ||
| 47 | case 'ArtifactResolve':  | 
            ||
| 48 | return ArtifactResolve::fromXML($xml);  | 
            ||
| 49 | default:  | 
            ||
| 50 |                 throw new Exception('Unknown SAML message: ' . var_export($xml->localName, true)); | 
            ||
| 51 | }  | 
            ||
| 54 |