Code Duplication    Length = 3-3 lines in 2 locations

src/SAML2/Message.php 1 location

@@ 538-540 (lines=3) @@
535
     */
536
    public static function fromXML(\DOMElement $xml)
537
    {
538
        if ($xml->namespaceURI !== Constants::NS_SAMLP) {
539
            throw new \Exception('Unknown namespace of SAML message: ' . var_export($xml->namespaceURI, true));
540
        }
541
542
        switch ($xml->localName) {
543
            case 'AttributeQuery':

src/SAML2/Assertion.php 1 location

@@ 348-350 (lines=3) @@
345
            if ($node instanceof \DOMText) {
346
                continue;
347
            }
348
            if ($node->namespaceURI !== Constants::NS_SAML) {
349
                throw new \Exception('Unknown namespace of condition: ' . var_export($node->namespaceURI, true));
350
            }
351
            switch ($node->localName) {
352
                case 'AudienceRestriction':
353
                    $audiences = Utils::extractStrings($node, Constants::NS_SAML, 'Audience');