| Total Complexity | 4 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class Instance implements \JsonSerializable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Cloud instance/machine ID |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $id; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Cloud instance/machine name |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $name; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $id |
||
| 25 | * @param string $name |
||
| 26 | */ |
||
| 27 | 2 | public function __construct($id, $name) |
|
| 28 | { |
||
| 29 | 2 | $this->id = $id; |
|
| 30 | 2 | $this->name = $name; |
|
| 31 | 2 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @return string |
||
| 35 | */ |
||
| 36 | 1 | public function id() |
|
| 37 | { |
||
| 38 | 1 | return $this->id; |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | 1 | public function name() |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | 1 | public function jsonSerialize() |
|
| 57 | 1 | ]; |
|
| 58 | } |
||
| 60 |