DeviceProperty::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Spinen\Ncentral\Type;
4
5
class DeviceProperty
6
{
7
8
    /**
9
     * @var string
10
     */
11
    private $defaultValue;
12
13
    /**
14
     * @var int
15
     */
16
    private $devicePropertyID;
17
18
    /**
19
     * @var string
20
     */
21
    private $dropdownValues;
22
23
    /**
24
     * @var string
25
     */
26
    private $label;
27
28
    /**
29
     * @var int
30
     */
31
    private $type;
32
33
    /**
34
     * @var string
35
     */
36
    private $value;
37
38
    /**
39
     * @return string
40
     */
41
    public function getDefaultValue()
42
    {
43
        return $this->defaultValue;
44
    }
45
46
    /**
47
     * @param string $defaultValue
48
     * @return DeviceProperty
49
     */
50
    public function withDefaultValue($defaultValue)
51
    {
52
        $new = clone $this;
53
        $new->defaultValue = $defaultValue;
54
55
        return $new;
56
    }
57
58
    /**
59
     * @return int
60
     */
61
    public function getDevicePropertyID()
62
    {
63
        return $this->devicePropertyID;
64
    }
65
66
    /**
67
     * @param int $devicePropertyID
68
     * @return DeviceProperty
69
     */
70
    public function withDevicePropertyID($devicePropertyID)
71
    {
72
        $new = clone $this;
73
        $new->devicePropertyID = $devicePropertyID;
74
75
        return $new;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getDropdownValues()
82
    {
83
        return $this->dropdownValues;
84
    }
85
86
    /**
87
     * @param string $dropdownValues
88
     * @return DeviceProperty
89
     */
90
    public function withDropdownValues($dropdownValues)
91
    {
92
        $new = clone $this;
93
        $new->dropdownValues = $dropdownValues;
94
95
        return $new;
96
    }
97
98
    /**
99
     * @return string
100
     */
101
    public function getLabel()
102
    {
103
        return $this->label;
104
    }
105
106
    /**
107
     * @param string $label
108
     * @return DeviceProperty
109
     */
110
    public function withLabel($label)
111
    {
112
        $new = clone $this;
113
        $new->label = $label;
114
115
        return $new;
116
    }
117
118
    /**
119
     * @return int
120
     */
121
    public function getType()
122
    {
123
        return $this->type;
124
    }
125
126
    /**
127
     * @param int $type
128
     * @return DeviceProperty
129
     */
130
    public function withType($type)
131
    {
132
        $new = clone $this;
133
        $new->type = $type;
134
135
        return $new;
136
    }
137
138
    /**
139
     * @return string
140
     */
141
    public function getValue()
142
    {
143
        return $this->value;
144
    }
145
146
    /**
147
     * @param string $value
148
     * @return DeviceProperty
149
     */
150
    public function withValue($value)
151
    {
152
        $new = clone $this;
153
        $new->value = $value;
154
155
        return $new;
156
    }
157
158
159
}
160
161