Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
13 / 13 |
|
100.00% |
13 / 13 |
CRAP | |
100.00% |
1 / 1 |
| StartupScript | |
100.00% |
13 / 13 |
|
100.00% |
13 / 13 |
13 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDateCreated | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setDateCreated | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDateModified | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setDateModified | |
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 | |||
| getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getScript | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setScript | |
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\StartupScripts; |
| 6 | |
| 7 | use Vultr\VultrPhp\Util\Model; |
| 8 | |
| 9 | /** |
| 10 | * Holds startup script information. |
| 11 | */ |
| 12 | class StartupScript extends Model |
| 13 | { |
| 14 | protected string $id; |
| 15 | protected string $dateCreated; |
| 16 | protected string $dateModified; |
| 17 | protected string $name; |
| 18 | protected string $type; |
| 19 | protected string $script; |
| 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 getDateCreated() : string |
| 32 | { |
| 33 | return $this->dateCreated; |
| 34 | } |
| 35 | |
| 36 | public function setDateCreated(string $date_created) : void |
| 37 | { |
| 38 | $this->dateCreated = $date_created; |
| 39 | } |
| 40 | |
| 41 | public function getDateModified() : string |
| 42 | { |
| 43 | return $this->dateModified; |
| 44 | } |
| 45 | |
| 46 | public function setDateModified(string $date_modified) : void |
| 47 | { |
| 48 | $this->dateModified = $date_modified; |
| 49 | } |
| 50 | |
| 51 | public function getName() : string |
| 52 | { |
| 53 | return $this->name; |
| 54 | } |
| 55 | |
| 56 | public function setName(string $name) : void |
| 57 | { |
| 58 | $this->name = $name; |
| 59 | } |
| 60 | |
| 61 | public function getType() : string |
| 62 | { |
| 63 | return $this->type; |
| 64 | } |
| 65 | |
| 66 | public function setType(string $type) : void |
| 67 | { |
| 68 | $this->type = $type; |
| 69 | } |
| 70 | |
| 71 | public function getScript() : string |
| 72 | { |
| 73 | return $this->script; |
| 74 | } |
| 75 | |
| 76 | public function setScript(string $script) : void |
| 77 | { |
| 78 | $this->script = $script; |
| 79 | } |
| 80 | |
| 81 | public function getUpdateParams() : array |
| 82 | { |
| 83 | return ['name', 'script', 'type']; |
| 84 | } |
| 85 | } |