Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
14 / 14
CRAP
100.00% covered (success)
100.00%
1 / 1
InstanceIPv4Info
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
14 / 14
14
100.00% covered (success)
100.00%
1 / 1
 getIp
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setIp
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getNetmask
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setNetmask
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getGateway
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setGateway
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getType
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setType
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getReverse
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setReverse
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMacAddress
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setMacAddress
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getResponseName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getModelExceptionClass
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Vultr\VultrPhp\Services\Instances;
6
7use Vultr\VultrPhp\Util\Model;
8
9/**
10 * Holds instance ipv4 address information.
11 */
12class InstanceIPv4Info extends Model
13{
14    protected string $ip;
15    protected string $netmask;
16    protected string $gateway;
17    protected string $type;
18    protected string $reverse;
19    protected ?string $macAddress = null;
20
21    public function getIp() : string
22    {
23        return $this->ip;
24    }
25
26    public function setIp(string $ip) : void
27    {
28        $this->ip = $ip;
29    }
30
31    public function getNetmask() : string
32    {
33        return $this->netmask;
34    }
35
36    public function setNetmask(string $netmask) : void
37    {
38        $this->netmask = $netmask;
39    }
40
41    public function getGateway() : string
42    {
43        return $this->gateway;
44    }
45
46    public function setGateway(string $gateway) : void
47    {
48        $this->gateway = $gateway;
49    }
50
51    public function getType() : string
52    {
53        return $this->type;
54    }
55
56    public function setType(string $type) : void
57    {
58        $this->type = $type;
59    }
60
61    public function getReverse() : string
62    {
63        return $this->reverse;
64    }
65
66    public function setReverse(string $reverse) : void
67    {
68        $this->reverse = $reverse;
69    }
70
71    public function getMacAddress() : ?string
72    {
73        return $this->macAddress;
74    }
75
76    public function setMacAddress(string $macAddress) : void
77    {
78        $this->macAddress = $macAddress;
79    }
80
81    public function getResponseName() : string
82    {
83        return 'ipv4';
84    }
85
86    public function getModelExceptionClass() : string
87    {
88        return str_replace('InstanceIPv4InfoException', 'InstanceException', parent::getModelExceptionClass());
89    }
90}