SimpleRestrictionModelTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setSimpleType() 0 3 1
A getSimpleType() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML\Trait;
6
7
use SimpleSAML\XMLSchema\XML\LocalSimpleType;
8
9
/**
10
 * Trait grouping common functionality for elements that are part of the xs:facets group.
11
 *
12
 * @package simplesamlphp/xml-common
13
 */
14
trait SimpleRestrictionModelTrait
15
{
16
    use FacetsTrait;
17
18
19
    /**
20
     * The simpleType.
21
     *
22
     * @var \SimpleSAML\XMLSchema\XML\LocalSimpleType|null
23
     */
24
    protected ?LocalSimpleType $simpleType = null;
25
26
27
    /**
28
     * Collect the value of the simpleType-property
29
     *
30
     * @return \SimpleSAML\XMLSchema\XML\LocalSimpleType|null
31
     */
32
    public function getSimpleType(): ?LocalSimpleType
33
    {
34
        return $this->simpleType;
35
    }
36
37
38
    /**
39
     * Set the value of the simpleType-property
40
     *
41
     * @param \SimpleSAML\XMLSchema\XML\LocalSimpleType|null $simpleType
42
     */
43
    protected function setSimpleType(?LocalSimpleType $simpleType = null): void
44
    {
45
        $this->simpleType = $simpleType;
46
    }
47
}
48