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

AbstractElementSingle::isNil()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace GoetasWebservices\XML\XSDReader\Schema\Element;
4
5
use GoetasWebservices\XML\XSDReader\Schema\Item;
6
7
class AbstractElementSingle extends Item implements ElementSingle
8
{
9
    /**
10
     * @var int
11
     */
12
    protected $min = 1;
13
14
    /**
15
     * @var int
16
     */
17
    protected $max = 1;
18
19
    /**
20
     * @var bool
21
     */
22
    protected $qualified = true;
23
24
    /**
25
     * @var bool
26
     */
27
    protected $nil = false;
28
29
    /**
30
     * @return bool
31
     */
32
    public function isQualified()
33
    {
34
        return $this->qualified;
35
    }
36
37
    /**
38
     * @param bool $qualified
39
     *
40
     * @return $this
41
     */
42
    public function setQualified($qualified)
43
    {
44
        $this->qualified = is_bool($qualified) ? $qualified : (bool) $qualified;
45
46
        return $this;
47
    }
48
49
    /**
50
     * @return bool
51
     */
52
    public function isNil()
53
    {
54
        return $this->nil;
55
    }
56
57
    /**
58
     * @param bool $nil
59
     *
60
     * @return $this
61
     */
62
    public function setNil($nil)
63
    {
64
        $this->nil = is_bool($nil) ? $nil : (bool) $nil;
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return int
71
     */
72
    public function getMin()
73
    {
74
        return $this->min;
75
    }
76
77
    /**
78
     * @param int $min
79
     *
80
     * @return $this
81
     */
82
    public function setMin($min)
83
    {
84
        $this->min = $min;
85
86
        return $this;
87
    }
88
89
    /**
90
     * @return int
91
     */
92
    public function getMax()
93
    {
94
        return $this->max;
95
    }
96
97
    /**
98
     * @param int $max
99
     *
100
     * @return $this
101
     */
102
    public function setMax($max)
103
    {
104
        $this->max = $max;
105
106
        return $this;
107
    }
108
}
109