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

AbstractSimpleRestrictionType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 39
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 22 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML\xs;
6
7
use SimpleSAML\XMLSchema\Type\Builtin\{IDValue, QNameValue};
8
9
/**
10
 * Abstract class representing the simpleRestrictionType-type.
11
 *
12
 * @package simplesamlphp/xml-common
13
 */
14
abstract class AbstractSimpleRestrictionType extends AbstractRestrictionType
15
{
16
    /**
17
     * AbstractRestrictionType constructor
18
     *
19
     * @param \SimpleSAML\XMLSchema\Type\Builtin\QNameValue $base
20
     * @param \SimpleSAML\XMLSchema\XML\xs\LocalSimpleType|null $localSimpleType
21
     * @param array<\SimpleSAML\XMLSchema\XML\xs\FacetInterface> $facets
22
     * @param (
23
     *    \SimpleSAML\XMLSchema\XML\xs\LocalAttribute|
24
     *    \SimpleSAML\XMLSchema\XML\xs\ReferencedAttributeGroup
25
     * )[] $attributes
26
     * @param \SimpleSAML\XMLSchema\XML\xs\AnyAttribute|null $anyAttribute
27
     * @param \SimpleSAML\XMLSchema\XML\xs\Annotation|null $annotation
28
     * @param \SimpleSAML\XMLSchema\Type\Builtin\IDValue|null $id
29
     * @param array<\SimpleSAML\XML\Attribute> $namespacedAttributes
30
     */
31
    public function __construct(
32
        QNameValue $base,
33
        // xs:simpleRestrictionModel
34
        ?LocalSimpleType $localSimpleType = null,
35
        array $facets = [],
36
        // xs:attrDecls
37
        array $attributes = [],
38
        ?AnyAttribute $anyAttribute = null,
39
        // parent defined
40
        ?Annotation $annotation = null,
41
        ?IDValue $id = null,
42
        array $namespacedAttributes = [],
43
    ) {
44
        parent::__construct(
45
            base: $base,
46
            localSimpleType: $localSimpleType,
47
            facets: $facets,
48
            attributes: $attributes,
49
            anyAttribute: $anyAttribute,
50
            annotation: $annotation,
51
            id: $id,
52
            namespacedAttributes: $namespacedAttributes,
53
        );
54
    }
55
}
56