Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
16 / 16 |
|
100.00% |
16 / 16 |
CRAP | |
100.00% |
1 / 1 |
FirewallGroup | |
100.00% |
16 / 16 |
|
100.00% |
16 / 16 |
16 | |
100.00% |
1 / 1 |
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDescription | |
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 | |||
getInstanceCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setInstanceCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getRuleCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setRuleCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getMaxRuleCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setMaxRuleCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUpdateParams | |
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\Firewall; |
6 | |
7 | use Vultr\VultrPhp\Util\Model; |
8 | |
9 | /** |
10 | * Holds firewall group information. |
11 | */ |
12 | class FirewallGroup extends Model |
13 | { |
14 | protected string $id; |
15 | protected string $description; |
16 | protected string $dateCreated; |
17 | protected string $dateModified; |
18 | protected int $instanceCount; |
19 | protected int $ruleCount; |
20 | protected int $maxRuleCount; |
21 | |
22 | public function getId() : string |
23 | { |
24 | return $this->id; |
25 | } |
26 | |
27 | public function setId(string $id) : void |
28 | { |
29 | $this->id = $id; |
30 | } |
31 | |
32 | public function getDescription() : string |
33 | { |
34 | return $this->description; |
35 | } |
36 | |
37 | public function setDescription(string $description) : void |
38 | { |
39 | $this->description = $description; |
40 | } |
41 | |
42 | public function getDateCreated() : string |
43 | { |
44 | return $this->dateCreated; |
45 | } |
46 | |
47 | public function setDateCreated(string $date_created) : void |
48 | { |
49 | $this->dateCreated = $date_created; |
50 | } |
51 | |
52 | public function getDateModified() : string |
53 | { |
54 | return $this->dateModified; |
55 | } |
56 | |
57 | public function setDateModified(string $date_modified) : void |
58 | { |
59 | $this->dateModified = $date_modified; |
60 | } |
61 | |
62 | public function getInstanceCount() : int |
63 | { |
64 | return $this->instanceCount; |
65 | } |
66 | |
67 | public function setInstanceCount(int $instance_count) : void |
68 | { |
69 | $this->instanceCount = $instance_count; |
70 | } |
71 | |
72 | public function getRuleCount() : int |
73 | { |
74 | return $this->ruleCount; |
75 | } |
76 | |
77 | public function setRuleCount(int $rule_count) : void |
78 | { |
79 | $this->ruleCount = $rule_count; |
80 | } |
81 | |
82 | public function getMaxRuleCount() : int |
83 | { |
84 | return $this->maxRuleCount; |
85 | } |
86 | |
87 | public function setMaxRuleCount(int $max_rule_count) : void |
88 | { |
89 | $this->maxRuleCount = $max_rule_count; |
90 | } |
91 | |
92 | public function getUpdateParams() : array |
93 | { |
94 | return ['description']; |
95 | } |
96 | |
97 | public function getModelExceptionClass() : string |
98 | { |
99 | return str_replace('FirewallGroupException', 'FirewallException', parent::getModelExceptionClass()); |
100 | } |
101 | } |
102 |