Passed
Push — static-analysis ( 1958c5...5a8282 )
by SignpostMarv
10:41 queued 08:16
created

Attribute::loadAttribute()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 20
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 4

Importance

Changes 0
Metric Value
cc 4
eloc 10
c 0
b 0
f 0
nc 8
nop 3
dl 0
loc 20
ccs 14
cts 14
cp 1
crap 4
rs 9.2
1
<?php
2
3
namespace GoetasWebservices\XML\XSDReader\Schema\Attribute;
4
5
use GoetasWebservices\XML\XSDReader\Schema\Item;
6
7
class Attribute extends Item implements AttributeSingle
8
{
9
    /**
10
     * @var static|null
11
     */
12
    protected $fixed;
13
14
    /**
15
     * @var static|null
16
     */
17
    protected $default;
18
19
    /**
20
     * @var bool
21
     */
22
    protected $qualified = true;
23
24
    /**
25
     * @var bool
26
     */
27
    protected $nil = false;
28
29
    /**
30
     * @var string
31
     */
32
    protected $use = self::USE_OPTIONAL;
33
34
    /**
35
     * @return static|null
36
     */
37
    public function getFixed()
38
    {
39
        return $this->fixed;
40
    }
41
42
    /**
43
     * @param static $fixed
44
     *
45
     * @return $this
46
     */
47
    public function setFixed($fixed)
48
    {
49
        $this->fixed = $fixed;
50
51
        return $this;
52
    }
53
54
    /**
55
     * @return static|null
56
     */
57
    public function getDefault()
58
    {
59
        return $this->default;
60
    }
61
62
    /**
63
     * @param static $default
64
     *
65
     * @return $this
66
     */
67
    public function setDefault($default)
68
    {
69
        $this->default = $default;
70
71
        return $this;
72
    }
73
74
    /**
75
     * @return bool
76
     */
77 1
    public function isQualified()
78
    {
79 1
        return $this->qualified;
80
    }
81
82
    /**
83
     * @param bool $qualified
84
     *
85
     * @return $this
86
     */
87 1
    public function setQualified($qualified)
88
    {
89 1
        $this->qualified = $qualified;
90
91 1
        return $this;
92
    }
93
94
    /**
95
     * @return bool
96
     */
97 1
    public function isNil()
98
    {
99 1
        return $this->nil;
100
    }
101
102
    /**
103
     * @param bool $nil
104
     *
105
     * @return $this
106
     */
107 1
    public function setNil($nil)
108
    {
109 1
        $this->nil = $nil;
110
111 1
        return $this;
112
    }
113
114
    /**
115
     * @return string
116
     */
117 1
    public function getUse()
118
    {
119 1
        return $this->use;
120
    }
121
122
    /**
123
     * @param string $use
124
     *
125
     * @return $this
126
     */
127 45
    public function setUse($use)
128
    {
129 45
        $this->use = $use;
130
131 45
        return $this;
132
    }
133
}
134