Total Complexity | 10 |
Total Lines | 100 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 | 1 | public function isQualified() |
|
33 | { |
||
34 | 1 | return $this->qualified; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param bool $qualified |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | 3 | public function setQualified($qualified) |
|
43 | { |
||
44 | 3 | $this->qualified = is_bool($qualified) ? $qualified : (bool) $qualified; |
|
45 | |||
46 | 3 | return $this; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return bool |
||
51 | */ |
||
52 | 1 | public function isNil() |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param bool $nil |
||
59 | * |
||
60 | * @return $this |
||
61 | */ |
||
62 | 3 | public function setNil($nil) |
|
67 | } |
||
68 | |||
69 | /** |
||
70 | * @return int |
||
71 | */ |
||
72 | 2 | public function getMin() |
|
73 | { |
||
74 | 2 | return $this->min; |
|
75 | } |
||
76 | |||
77 | /** |
||
78 | * @param int $min |
||
79 | * |
||
80 | * @return $this |
||
81 | */ |
||
82 | 45 | public function setMin($min) |
|
87 | } |
||
88 | |||
89 | /** |
||
90 | * @return int |
||
91 | */ |
||
92 | 4 | public function getMax() |
|
93 | { |
||
94 | 4 | return $this->max; |
|
95 | } |
||
96 | |||
97 | /** |
||
98 | * @param int $max |
||
99 | * |
||
100 | * @return $this |
||
101 | */ |
||
102 | 45 | public function setMax($max) |
|
107 | } |
||
108 | } |
||
109 |