AbstractOpenAttrs   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML;
6
7
use SimpleSAML\XMLSchema\XML\Constants\NS;
8
9
/**
10
 * Abstract class to be implemented by all the classes that use the openAttrs complex type
11
 *
12
 * @package simplesamlphp/xml-common
13
 */
14
abstract class AbstractOpenAttrs extends AbstractAnyType
15
{
16
    /** The namespace-attribute for the xs:any element */
17
    public const XS_ANY_ELT_NAMESPACE = [];
18
19
    /** The namespace-attribute for the xs:anyAttribute element */
20
    public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
21
22
23
    /**
24
     * AbstractAnyType constructor
25
     *
26
     * @param array<\SimpleSAML\XML\Attribute> $attributes
27
     */
28
    public function __construct(
29
        array $attributes = [],
30
    ) {
31
        /**
32
         * NOTE: no elements allowed here:
33
         *
34
         * @see XML Schema specification (Part 1, Section 3.4.2)
35
         *
36
         * If no content model is specified in a restriction, the content model is effectively empty
37
         * for elements unless mixed content is explicitly allowed.
38
         */
39
        parent::__construct([], $attributes);
40
    }
41
}
42