Test Failed
Pull Request — develop (#4)
by Stephen
06:10
created

ConfigValue::withKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
1
<?php
2
3
namespace Spinen\Nable\Ncentral\Type;
4
5
class ConfigValue
6
{
7
8
    /**
9
     * @var string
10
     */
11
    private $dataType;
12
13
    /**
14
     * @var string
15
     */
16
    private $description;
17
18
    /**
19
     * @var string
20
     */
21
    private $key;
22
23
    /**
24
     * @var string
25
     */
26
    private $value;
27
28
    /**
29
     * @return string
30
     */
31
    public function getDataType()
32
    {
33
        return $this->dataType;
34
    }
35
36
    /**
37
     * @param string $dataType
38
     * @return ConfigValue
39
     */
40
    public function withDataType($dataType)
41
    {
42
        $new = clone $this;
43
        $new->dataType = $dataType;
44
45
        return $new;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getDescription()
52
    {
53
        return $this->description;
54
    }
55
56
    /**
57
     * @param string $description
58
     * @return ConfigValue
59
     */
60
    public function withDescription($description)
61
    {
62
        $new = clone $this;
63
        $new->description = $description;
64
65
        return $new;
66
    }
67
68
    /**
69
     * @return string
70
     */
71
    public function getKey()
72
    {
73
        return $this->key;
74
    }
75
76
    /**
77
     * @param string $key
78
     * @return ConfigValue
79
     */
80
    public function withKey($key)
81
    {
82
        $new = clone $this;
83
        $new->key = $key;
84
85
        return $new;
86
    }
87
88
    /**
89
     * @return string
90
     */
91
    public function getValue()
92
    {
93
        return $this->value;
94
    }
95
96
    /**
97
     * @param string $value
98
     * @return ConfigValue
99
     */
100
    public function withValue($value)
101
    {
102
        $new = clone $this;
103
        $new->value = $value;
104
105
        return $new;
106
    }
107
108
109
}
110
111