Code Duplication    Length = 9-9 lines in 2 locations

src/LightSaml/Model/Metadata/EntitiesDescriptor.php 1 location

@@ 55-63 (lines=9) @@
52
     *
53
     * @return EntitiesDescriptor
54
     */
55
    public static function loadXml($xml)
56
    {
57
        $context = new DeserializationContext();
58
        $context->getDocument()->loadXML($xml);
59
        $ed = new self();
60
        $ed->deserialize($context->getDocument(), $context);
61
62
        return $ed;
63
    }
64
65
    /**
66
     * @param string $cacheDuration

src/LightSaml/Model/Metadata/EntityDescriptor.php 1 location

@@ 61-69 (lines=9) @@
58
     *
59
     * @return EntityDescriptor
60
     */
61
    public static function loadXml($xml)
62
    {
63
        $context = new DeserializationContext();
64
        $context->getDocument()->loadXML($xml);
65
        $ed = new self();
66
        $ed->deserialize($context->getDocument(), $context);
67
68
        return $ed;
69
    }
70
71
    /**
72
     * @param string|null $entityId