| Total Complexity | 8 |
| Total Lines | 101 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 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) |
||
| 106 | } |
||
| 107 | |||
| 108 | |||
| 109 | } |
||
| 110 | |||
| 111 |