Code Duplication    Length = 7-8 lines in 2 locations

src/SAML2/Message.php 1 location

@@ 174-181 (lines=8) @@
171
        try {
172
            $sig = Utils::validateElement($xml);
173
174
            if ($sig !== false) {
175
                $this->messageContainedSignatureUponConstruction = true;
176
                $this->certificates = $sig['Certificates'];
177
                $this->validators[] = array(
178
                    'Function' => array('\SAML2\Utils', 'validateSignature'),
179
                    'Data' => $sig,
180
                    );
181
            }
182
        } catch (\Exception $e) {
183
            /* Ignore signature validation errors. */
184
        }

src/SAML2/SignedElementHelper.php 1 location

@@ 57-63 (lines=7) @@
54
        try {
55
            $sig = Utils::validateElement($xml);
56
57
            if ($sig !== false) {
58
                $this->certificates = $sig['Certificates'];
59
                $this->validators[] = array(
60
                    'Function' => array('\SAML2\Utils', 'validateSignature'),
61
                    'Data' => $sig,
62
                );
63
            }
64
        } catch (\Exception $e) {
65
            /* Ignore signature validation errors. */
66
        }