Passed
Push — master ( 8413b2...00f101 )
by Tim
02:19
created

AbstractNamedAttributeGroup::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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