Code Duplication    Length = 6-6 lines in 2 locations

src/SAML2/XML/saml/BaseIDType.php 1 location

@@ 81-86 (lines=6) @@
78
        assert('is_string($this->NameQualifier) || is_null($this->NameQualifier');
79
        assert('is_string($this->SPNameQualifier) || is_null($this->SPNameQualifier');
80
81
        if ($parent === null) {
82
            $parent = DOMDocumentFactory::create();
83
            $doc = $parent;
84
        } else {
85
            $doc = $parent->ownerDocument;
86
        }
87
        $element = $doc->createElementNS(Constants::NS_SAML, $this->nodeName);
88
        $parent->appendChild($element);
89

src/SAML2/XML/saml/Issuer.php 1 location

@@ 63-68 (lines=6) @@
60
         * From saml-core-2.0-os 8.3.6, when the entity Format is used: "The NameQualifier, SPNameQualifier, and
61
         * SPProvidedID attributes MUST be omitted."
62
         */
63
        if ($parent === null) {
64
            $parent = DOMDocumentFactory::create();
65
            $doc = $parent;
66
        } else {
67
            $doc = $parent->ownerDocument;
68
        }
69
        $element = $doc->createElementNS(Constants::NS_SAML, 'saml:Issuer');
70
        $parent->appendChild($element);
71