Completed
Push — master ( d47c33...3f2f6b )
by Asmir
14s queued 11s
created

AbstractElementSingle::setDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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