| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 100.00% | 14 / 14 |  | 100.00% | 14 / 14 | CRAP |  | 100.00% | 1 / 1 | 
| Record |  | 100.00% | 14 / 14 |  | 100.00% | 14 / 14 | 14 |  | 100.00% | 1 / 1 | 
| getId |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| setId |  | 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 | |||
| getName |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| setName |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| getData |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| setData |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| getPriority |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| setPriority |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| getTtl |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| setTtl |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| getModelExceptionClass |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| getUpdateParams |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| 1 | <?php | 
| 2 | |
| 3 | declare(strict_types=1); | 
| 4 | |
| 5 | namespace Vultr\VultrPhp\Services\DNS; | 
| 6 | |
| 7 | use Vultr\VultrPhp\Util\Model; | 
| 8 | |
| 9 | /** | 
| 10 | * Holds a Record for the Domain name. | 
| 11 | */ | 
| 12 | class Record extends Model | 
| 13 | { | 
| 14 | protected string $id; | 
| 15 | protected string $type; | 
| 16 | protected string $name; | 
| 17 | protected string $data; | 
| 18 | protected int $priority; | 
| 19 | protected int $ttl; | 
| 20 | |
| 21 | public function getId() : string | 
| 22 | { | 
| 23 | return $this->id; | 
| 24 | } | 
| 25 | |
| 26 | public function setId(string $id) : void | 
| 27 | { | 
| 28 | $this->id = $id; | 
| 29 | } | 
| 30 | |
| 31 | public function getType() : string | 
| 32 | { | 
| 33 | return $this->type; | 
| 34 | } | 
| 35 | |
| 36 | public function setType(string $type) : void | 
| 37 | { | 
| 38 | $this->type = $type; | 
| 39 | } | 
| 40 | |
| 41 | public function getName() : string | 
| 42 | { | 
| 43 | return $this->name; | 
| 44 | } | 
| 45 | |
| 46 | public function setName(string $name) : void | 
| 47 | { | 
| 48 | $this->name = $name; | 
| 49 | } | 
| 50 | |
| 51 | public function getData() : string | 
| 52 | { | 
| 53 | return $this->data; | 
| 54 | } | 
| 55 | |
| 56 | public function setData(string $data) : void | 
| 57 | { | 
| 58 | $this->data = $data; | 
| 59 | } | 
| 60 | |
| 61 | public function getPriority() : int | 
| 62 | { | 
| 63 | return $this->priority; | 
| 64 | } | 
| 65 | |
| 66 | public function setPriority(int $priority) : void | 
| 67 | { | 
| 68 | $this->priority = $priority; | 
| 69 | } | 
| 70 | |
| 71 | public function getTtl() : int | 
| 72 | { | 
| 73 | return $this->ttl; | 
| 74 | } | 
| 75 | |
| 76 | public function setTtl(int $ttl) : void | 
| 77 | { | 
| 78 | $this->ttl = $ttl; | 
| 79 | } | 
| 80 | |
| 81 | public function getModelExceptionClass() : string | 
| 82 | { | 
| 83 | return str_replace('RecordException', 'DNSException', parent::getModelExceptionClass()); | 
| 84 | } | 
| 85 | |
| 86 | public function getUpdateParams() : array | 
| 87 | { | 
| 88 | return ['name', 'data', 'ttl', 'priority']; | 
| 89 | } | 
| 90 | } |