Passed
Pull Request — master (#18)
by SignpostMarv
05:20
created

Attribute::setDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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