Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
23 / 23 |
|
100.00% |
23 / 23 |
CRAP | |
100.00% |
1 / 1 |
| BMPlan | |
100.00% |
23 / 23 |
|
100.00% |
23 / 23 |
23 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCpuCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setCpuCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCpuThreads | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setCpuThreads | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCpuModel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setCpuModel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getRam | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setRam | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDisk | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setDisk | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDiskCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setDiskCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getBandwidth | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBandwidth | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMonthlyCost | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setMonthlyCost | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLocations | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setLocations | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getResponseListName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Vultr\VultrPhp\Services\Plans; |
| 6 | |
| 7 | use Vultr\VultrPhp\Util\Model; |
| 8 | |
| 9 | /** |
| 10 | * Holds bare metal plan information. |
| 11 | */ |
| 12 | class BMPlan extends Model |
| 13 | { |
| 14 | protected string $id; |
| 15 | protected int $cpuCount; |
| 16 | protected int $cpuThreads; |
| 17 | protected string $cpuModel; |
| 18 | protected int $ram; |
| 19 | protected int $disk; |
| 20 | protected int $diskCount; |
| 21 | protected int $bandwidth; |
| 22 | protected float $monthlyCost; |
| 23 | protected string $type; |
| 24 | protected array $locations; |
| 25 | |
| 26 | public function getId() : string |
| 27 | { |
| 28 | return $this->id; |
| 29 | } |
| 30 | |
| 31 | public function setId(string $id) : void |
| 32 | { |
| 33 | $this->id = $id; |
| 34 | } |
| 35 | |
| 36 | public function getCpuCount() : int |
| 37 | { |
| 38 | return $this->cpuCount; |
| 39 | } |
| 40 | |
| 41 | public function setCpuCount(int $cpu) : void |
| 42 | { |
| 43 | $this->cpuCount = $cpu; |
| 44 | } |
| 45 | |
| 46 | public function getCpuThreads() : int |
| 47 | { |
| 48 | return $this->cpuThreads; |
| 49 | } |
| 50 | |
| 51 | public function setCpuThreads(int $cpu_threads) : void |
| 52 | { |
| 53 | $this->cpuThreads = $cpu_threads; |
| 54 | } |
| 55 | |
| 56 | public function getCpuModel() : string |
| 57 | { |
| 58 | return $this->cpuModel; |
| 59 | } |
| 60 | |
| 61 | public function setCpuModel(string $cpu_model) : void |
| 62 | { |
| 63 | $this->cpuModel = $cpu_model; |
| 64 | } |
| 65 | |
| 66 | public function getRam() : int |
| 67 | { |
| 68 | return $this->ram; |
| 69 | } |
| 70 | |
| 71 | public function setRam(int $ram) : void |
| 72 | { |
| 73 | $this->ram = $ram; |
| 74 | } |
| 75 | |
| 76 | public function getDisk() : int |
| 77 | { |
| 78 | return $this->disk; |
| 79 | } |
| 80 | |
| 81 | public function setDisk(int $size) : void |
| 82 | { |
| 83 | $this->disk = $size; |
| 84 | } |
| 85 | |
| 86 | public function getDiskCount() : int |
| 87 | { |
| 88 | return $this->diskCount; |
| 89 | } |
| 90 | |
| 91 | public function setDiskCount(int $disk_count) : void |
| 92 | { |
| 93 | $this->diskCount = $disk_count; |
| 94 | } |
| 95 | |
| 96 | public function getBandwidth() : int |
| 97 | { |
| 98 | return $this->bandwidth; |
| 99 | } |
| 100 | |
| 101 | public function setBandwidth(int $bandwidth) : void |
| 102 | { |
| 103 | $this->bandwidth = $bandwidth; |
| 104 | } |
| 105 | |
| 106 | public function getMonthlyCost() : float |
| 107 | { |
| 108 | return $this->monthlyCost; |
| 109 | } |
| 110 | |
| 111 | public function setMonthlyCost(float $monthly_cost) : void |
| 112 | { |
| 113 | $this->monthlyCost = $monthly_cost; |
| 114 | } |
| 115 | |
| 116 | public function getType() : string |
| 117 | { |
| 118 | return $this->type; |
| 119 | } |
| 120 | |
| 121 | public function setType(string $type) : void |
| 122 | { |
| 123 | $this->type = $type; |
| 124 | } |
| 125 | |
| 126 | public function getLocations() : array |
| 127 | { |
| 128 | return $this->locations; |
| 129 | } |
| 130 | |
| 131 | public function setLocations(array $locations) : void |
| 132 | { |
| 133 | $this->locations = $locations; |
| 134 | } |
| 135 | |
| 136 | public function getResponseListName() : string |
| 137 | { |
| 138 | return 'plans_metal'; |
| 139 | } |
| 140 | } |