SpecialAttrsTrait   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 116
Duplicated Lines 0 %

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A setSpace() 0 3 1
A setBase() 0 3 1
A getSpace() 0 3 1
A getBase() 0 3 1
A setID() 0 3 1
A getLang() 0 3 1
A setLang() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XML\XML\Trait;
6
7
use SimpleSAML\XML\Type\BaseValue;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XML\Type\BaseValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use SimpleSAML\XML\Type\IDValue;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XML\Type\IDValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use SimpleSAML\XML\Type\LangValue;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XML\Type\LangValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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
 *
17
 * @phpstan-ignore trait.unused
18
 */
19
trait SpecialAttrsTrait
20
{
21
    /**
22
     * The base.
23
     *
24
     * @var \SimpleSAML\XML\Type\BaseValue|null
25
     */
26
    protected readonly ?BaseValue $base;
27
28
    /**
29
     * The id.
30
     *
31
     * @var \SimpleSAML\XML\Type\IDValue|null
32
     */
33
    protected readonly ?IDValue $id;
34
35
    /**
36
     * The lang.
37
     *
38
     * @var \SimpleSAML\XML\Type\LangValue|null
39
     */
40
    protected readonly ?LangValue $lang;
41
42
    /**
43
     * The space.
44
     *
45
     * @var \SimpleSAML\XML\Type\SpaceValue|null
46
     */
47
    protected readonly ?SpaceValue $space;
48
49
50
    /**
51
     * Collect the value of the base-property
52
     *
53
     * @return \SimpleSAML\XML\Type\BaseValue|null
54
     */
55
    public function getBase(): ?BaseValue
56
    {
57
        return $this->base;
58
    }
59
60
61
    /**
62
     * Set the value of the base-property
63
     *
64
     * @param \SimpleSAML\XML\Type\BaseValue|null $base
65
     */
66
    protected function setBase(?BaseValue $base): void
67
    {
68
        $this->base = $base;
0 ignored issues
show
Bug introduced by
The property base is declared read-only in SimpleSAML\XML\XML\Trait\SpecialAttrsTrait.
Loading history...
69
    }
70
71
72
    /**
73
     * Collect the value of the id-property
74
     *
75
     * @return \SimpleSAML\XML\Type\IDValue|null
76
     */
77
    public function getId(): ?IDValue
78
    {
79
        return $this->id;
80
    }
81
82
83
    /**
84
     * Set the value of the id-property
85
     *
86
     * @param \SimpleSAML\XML\Type\IDValue|null $id
87
     */
88
    protected function setID(?IDValue $id): void
89
    {
90
        $this->id = $id;
0 ignored issues
show
Bug introduced by
The property id is declared read-only in SimpleSAML\XML\XML\Trait\SpecialAttrsTrait.
Loading history...
91
    }
92
93
94
    /**
95
     * Collect the value of the lang-property
96
     *
97
     * @return \SimpleSAML\XML\Type\LangValue|null
98
     */
99
    public function getLang(): ?LangValue
100
    {
101
        return $this->lang;
102
    }
103
104
105
    /**
106
     * Set the value of the lang-property
107
     *
108
     * @param \SimpleSAML\XML\Type\LangValue|null $id
109
     */
110
    protected function setLang(?LangValue $lang): void
111
    {
112
        $this->lang = $lang;
0 ignored issues
show
Bug introduced by
The property lang is declared read-only in SimpleSAML\XML\XML\Trait\SpecialAttrsTrait.
Loading history...
113
    }
114
115
116
    /**
117
     * Collect the value of the space-property
118
     *
119
     * @return \SimpleSAML\XML\Type\SpaceValue|null
120
     */
121
    public function getSpace(): ?SpaceValue
122
    {
123
        return $this->space;
124
    }
125
126
127
    /**
128
     * Set the value of the space-property
129
     *
130
     * @param \SimpleSAML\XML\Type\SpaceValue|null $id
131
     */
132
    protected function setSpace(?SpaceValue $space): void
133
    {
134
        $this->space = $space;
0 ignored issues
show
Bug introduced by
The property space is declared read-only in SimpleSAML\XML\XML\Trait\SpecialAttrsTrait.
Loading history...
135
    }
136
}
137