AbstractNamedAttributeGroup   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML;
6
7
use SimpleSAML\XMLSchema\Type\IDValue;
8
use SimpleSAML\XMLSchema\Type\NCNameValue;
9
use SimpleSAML\XMLSchema\XML\Constants\NS;
10
11
/**
12
 * Abstract class representing the namedAttributeGroup-type.
13
 *
14
 * @package simplesamlphp/xml-common
15
 */
16
abstract class AbstractNamedAttributeGroup extends AbstractAttributeGroup
17
{
18
    /** The namespace-attribute for the xs:anyAttribute element */
19
    public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
20
21
22
    /**
23
     * NamedAttributeGroup constructor
24
     *
25
     * @param \SimpleSAML\XMLSchema\Type\NCNameValue $name
26
     * @param (
27
     *     \SimpleSAML\XMLSchema\XML\LocalAttribute|
28
     *     \SimpleSAML\XMLSchema\XML\ReferencedAttributeGroup
29
     * )[] $attributes
30
     * @param \SimpleSAML\XMLSchema\XML\AnyAttribute|null $anyAttribute
31
     * @param \SimpleSAML\XMLSchema\XML\Annotation|null $annotation
32
     * @param \SimpleSAML\XMLSchema\Type\IDValue|null $id
33
     * @param array<\SimpleSAML\XML\Attribute> $namespacedAttributes
34
     */
35
    public function __construct(
36
        NCNameValue $name,
37
        array $attributes = [],
38
        ?AnyAttribute $anyAttribute = null,
39
        ?Annotation $annotation = null,
40
        ?IDValue $id = null,
41
        array $namespacedAttributes = [],
42
    ) {
43
        parent::__construct(
44
            name: $name,
45
            attributes: $attributes,
46
            anyAttribute: $anyAttribute,
47
            reference: null,
48
            annotation: $annotation,
49
            id: $id,
50
            namespacedAttributes: $namespacedAttributes,
51
        );
52
    }
53
}
54