SpecialAttrsTrait::getLang()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XML\XML\Trait;
6
7
use SimpleSAML\XML\Type\BaseValue;
8
use SimpleSAML\XML\Type\IDValue;
9
use SimpleSAML\XML\Type\LangValue;
10
use SimpleSAML\XML\Type\SpaceValue;
11
12
/**
13
 * Trait grouping common functionality for elements that use the specialAttrs-attributeGroup.
14
 *
15
 * @package simplesamlphp/xml-common
16
 * @phpstan-ignore trait.unused
17
 */
18
trait SpecialAttrsTrait
19
{
20
    /**
21
     * The base.
22
     *
23
     * @var \SimpleSAML\XML\Type\BaseValue|null
24
     */
25
    protected ?BaseValue $base = null;
26
27
    /**
28
     * The id.
29
     *
30
     * @var \SimpleSAML\XML\Type\IDValue|null
31
     */
32
    protected ?IDValue $id = null;
33
34
    /**
35
     * The lang.
36
     *
37
     * @var \SimpleSAML\XML\Type\LangValue|null
38
     */
39
    protected ?LangValue $lang = null;
40
41
    /**
42
     * The space.
43
     *
44
     * @var \SimpleSAML\XML\Type\SpaceValue|null
45
     */
46
    protected ?SpaceValue $space = null;
47
48
49
    /**
50
     * Collect the value of the base-property
51
     *
52
     * @return \SimpleSAML\XML\Type\BaseValue|null
53
     */
54
    public function getBase(): ?BaseValue
55
    {
56
        return $this->base;
57
    }
58
59
60
    /**
61
     * Set the value of the base-property
62
     *
63
     * @param \SimpleSAML\XML\Type\BaseValue|null $base
64
     */
65
    protected function setBase(?BaseValue $base): void
66
    {
67
        $this->base = $base;
68
    }
69
70
71
    /**
72
     * Collect the value of the id-property
73
     *
74
     * @return \SimpleSAML\XML\Type\IDValue|null
75
     */
76
    public function getId(): ?IDValue
77
    {
78
        return $this->id;
79
    }
80
81
82
    /**
83
     * Set the value of the id-property
84
     *
85
     * @param \SimpleSAML\XML\Type\IDValue|null $id
86
     */
87
    protected function setID(?IDValue $id): void
88
    {
89
        $this->id = $id;
90
    }
91
92
93
    /**
94
     * Collect the value of the lang-property
95
     *
96
     * @return \SimpleSAML\XML\Type\LangValue|null
97
     */
98
    public function getLang(): ?LangValue
99
    {
100
        return $this->lang;
101
    }
102
103
104
    /**
105
     * Set the value of the lang-property
106
     *
107
     * @param \SimpleSAML\XML\Type\LangValue|null $id
108
     */
109
    protected function setLang(?LangValue $lang): void
110
    {
111
        $this->lang = $lang;
112
    }
113
114
115
    /**
116
     * Collect the value of the space-property
117
     *
118
     * @return \SimpleSAML\XML\Type\SpaceValue|null
119
     */
120
    public function getSpace(): ?SpaceValue
121
    {
122
        return $this->space;
123
    }
124
125
126
    /**
127
     * Set the value of the space-property
128
     *
129
     * @param \SimpleSAML\XML\Type\SpaceValue|null $id
130
     */
131
    protected function setSpace(?SpaceValue $space): void
132
    {
133
        $this->space = $space;
134
    }
135
}
136