Completed
Push — php-7.1 ( 020623...f0f10f )
by SignpostMarv
11:52 queued 02:50
created

Attribute::setFixed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 0
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\XML\XSDReader\Schema\Attribute;
6
7
class Attribute extends AbstractAttributeItem implements AttributeSingle
8
{
9
    /**
10
     * @var bool
11
     */
12
    protected $qualified = true;
13
14
    /**
15
     * @var bool
16
     */
17
    protected $nil = false;
18
19
    /**
20
     * @var string
21
     */
22
    protected $use = self::USE_OPTIONAL;
23
24
    public function isQualified(): bool
25
    {
26
        return $this->qualified;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function setQualified(bool $qualified): AttributeSingle
33
    {
34
        $this->qualified = $qualified;
35
36
        return $this;
37
    }
38
39
    public function isNil(): bool
40
    {
41
        return $this->nil;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function setNil(bool $nil): AttributeSingle
48
    {
49
        $this->nil = $nil;
50
51
        return $this;
52
    }
53
54
    public function getUse(): string
55
    {
56
        return $this->use;
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function setUse(string $use): AttributeSingle
63
    {
64
        $this->use = $use;
65
66
        return $this;
67
    }
68
}
69