| Total Complexity | 8 |
| Total Lines | 101 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class DeviceProperties |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var int |
||
| 10 | */ |
||
| 11 | private $deviceID; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private $deviceName; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var \Spinen\Ncentral\Type\DeviceProperty |
||
| 20 | */ |
||
| 21 | private $properties; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $url; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return int |
||
| 30 | */ |
||
| 31 | public function getDeviceID() |
||
| 32 | { |
||
| 33 | return $this->deviceID; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param int $deviceID |
||
| 38 | * @return DeviceProperties |
||
| 39 | */ |
||
| 40 | public function withDeviceID($deviceID) |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function getDeviceName() |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $deviceName |
||
| 58 | * @return DeviceProperties |
||
| 59 | */ |
||
| 60 | public function withDeviceName($deviceName) |
||
| 61 | { |
||
| 62 | $new = clone $this; |
||
| 63 | $new->deviceName = $deviceName; |
||
| 64 | |||
| 65 | return $new; |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return \Spinen\Ncentral\Type\DeviceProperty |
||
| 70 | */ |
||
| 71 | public function getProperties() |
||
| 72 | { |
||
| 73 | return $this->properties; |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @param \Spinen\Ncentral\Type\DeviceProperty $properties |
||
| 78 | * @return DeviceProperties |
||
| 79 | */ |
||
| 80 | public function withProperties($properties) |
||
| 81 | { |
||
| 82 | $new = clone $this; |
||
| 83 | $new->properties = $properties; |
||
| 84 | |||
| 85 | return $new; |
||
| 86 | } |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @return string |
||
| 90 | */ |
||
| 91 | public function getUrl() |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * @param string $url |
||
| 98 | * @return DeviceProperties |
||
| 99 | */ |
||
| 100 | public function withUrl($url) |
||
| 106 | } |
||
| 107 | |||
| 108 | |||
| 111 |