Issues (311)

src/XML/dsig11/NamedCurve.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSecurity\XML\dsig11;
6
7
use DOMElement;
8
use SimpleSAML\Assert\Assert;
9
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
10
use SimpleSAML\XMLSchema\Type\AnyURIValue;
0 ignored issues
show
The type SimpleSAML\XMLSchema\Type\AnyURIValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
12
/**
13
 * Class representing a dsig11:NamedCurve element.
14
 *
15
 * @package simplesaml/xml-security
16
 */
17
final class NamedCurve extends AbstractNamedCurveType
18
{
19
    /**
20
     * Convert XML into a NamedCurve element
21
     *
22
     * @param \DOMElement $xml The XML element we should load
23
     *
24
     * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException
25
     *   If the qualified name of the supplied element is wrong
26
     */
27
    public static function fromXML(DOMElement $xml): static
28
    {
29
        Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class);
30
        Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class);
31
32
        return new static(
33
            self::getAttribute($xml, 'URI', AnyURIValue::class),
34
        );
35
    }
36
}
37