Passed
Pull Request — master (#61)
by Tim
02:17
created

AbstractNamedAttributeGroup::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
nc 1
nop 6
dl 0
loc 16
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML\xs;
6
7
use SimpleSAML\XMLSchema\Type\Builtin\{IDValue, NCNameValue};
8
use SimpleSAML\XMLSchema\XML\xs\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\Builtin\NCNameValue $name
25
     * @param (
26
     *     \SimpleSAML\XMLSchema\XML\xs\LocalAttribute|
27
     *     \SimpleSAML\XMLSchema\XML\xs\ReferencedAttributeGroup
28
     * )[] $attributes
29
     * @param \SimpleSAML\XMLSchema\XML\xs\AnyAttribute|null $anyAttribute
30
     * @param \SimpleSAML\XMLSchema\XML\xs\Annotation|null $annotation
31
     * @param \SimpleSAML\XMLSchema\Type\Builtin\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