Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
CRAP | |
100.00% |
1 / 1 |
| VPCAttachment | |
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
8 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMacAddress | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setMacAddress | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getIpAddress | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setIpAddress | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getResponseName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getModelExceptionClass | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Vultr\VultrPhp\Services\Instances; |
| 6 | |
| 7 | use Vultr\VultrPhp\Util\Model; |
| 8 | |
| 9 | /** |
| 10 | * Holds information on the virtual private cloud network that is attached to a instance. |
| 11 | */ |
| 12 | class VPCAttachment extends Model |
| 13 | { |
| 14 | protected string $id; |
| 15 | protected string $macAddress; |
| 16 | protected string $ipAddress; |
| 17 | |
| 18 | public function getId() : string |
| 19 | { |
| 20 | return $this->id; |
| 21 | } |
| 22 | |
| 23 | public function setId(string $id) : void |
| 24 | { |
| 25 | $this->id = $id; |
| 26 | } |
| 27 | |
| 28 | public function getMacAddress() : string |
| 29 | { |
| 30 | return $this->macAddress; |
| 31 | } |
| 32 | |
| 33 | public function setMacAddress(string $mac_address) : void |
| 34 | { |
| 35 | $this->macAddress = $mac_address; |
| 36 | } |
| 37 | |
| 38 | public function getIpAddress() : string |
| 39 | { |
| 40 | return $this->ipAddress; |
| 41 | } |
| 42 | |
| 43 | public function setIpAddress(string $ip_address) : void |
| 44 | { |
| 45 | $this->ipAddress = $ip_address; |
| 46 | } |
| 47 | |
| 48 | public function getResponseName() : string |
| 49 | { |
| 50 | return 'vpc'; |
| 51 | } |
| 52 | |
| 53 | public function getModelExceptionClass() : string |
| 54 | { |
| 55 | return str_replace('VPCAttachmentException', 'InstanceException', parent::getModelExceptionClass()); |
| 56 | } |
| 57 | } |