Code Duplication    Length = 3-3 lines in 2 locations

src/SAML2/Message.php 1 location

@@ 564-566 (lines=3) @@
561
     */
562
    public static function fromXML(\DOMElement $xml)
563
    {
564
        if ($xml->namespaceURI !== Constants::NS_SAMLP) {
565
            throw new \Exception('Unknown namespace of SAML message: '.var_export($xml->namespaceURI, true));
566
        }
567
568
        switch ($xml->localName) {
569
            case 'AttributeQuery':

src/SAML2/Assertion.php 1 location

@@ 382-384 (lines=3) @@
379
            if ($node instanceof \DOMText) {
380
                continue;
381
            }
382
            if ($node->namespaceURI !== Constants::NS_SAML) {
383
                throw new \Exception('Unknown namespace of condition: ' . var_export($node->namespaceURI, true));
384
            }
385
            switch ($node->localName) {
386
                case 'AudienceRestriction':
387
                    $audiences = Utils::extractStrings($node, Constants::NS_SAML, 'Audience');