Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
12 / 12 |
|
100.00% |
12 / 12 |
CRAP | |
100.00% |
1 / 1 |
ForwardRule | |
100.00% |
12 / 12 |
|
100.00% |
12 / 12 |
12 | |
100.00% |
1 / 1 |
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFrontendProtocol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setFrontendProtocol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFrontendPort | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setFrontendPort | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getBackendProtocol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setBackendProtocol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getBackendPort | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setBackendPort | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getResponseName | |
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\LoadBalancers; |
6 | |
7 | use Vultr\VultrPhp\Util\Model; |
8 | |
9 | /** |
10 | * Holds forward rule information. |
11 | */ |
12 | class ForwardRule extends Model |
13 | { |
14 | protected string $id; |
15 | protected string $frontendProtocol; |
16 | protected int $frontendPort; |
17 | protected string $backendProtocol; |
18 | protected int $backendPort; |
19 | |
20 | public function getId() : string |
21 | { |
22 | return $this->id; |
23 | } |
24 | |
25 | public function setId(string $id) : void |
26 | { |
27 | $this->id = $id; |
28 | } |
29 | |
30 | public function getFrontendProtocol() : string |
31 | { |
32 | return $this->frontendProtocol; |
33 | } |
34 | |
35 | public function setFrontendProtocol(string $frontend_protocol) : void |
36 | { |
37 | $this->frontendProtocol = $frontend_protocol; |
38 | } |
39 | |
40 | public function getFrontendPort() : int |
41 | { |
42 | return $this->frontendPort; |
43 | } |
44 | |
45 | public function setFrontendPort(int $frontend_port) : void |
46 | { |
47 | $this->frontendPort = $frontend_port; |
48 | } |
49 | |
50 | public function getBackendProtocol() : string |
51 | { |
52 | return $this->backendProtocol; |
53 | } |
54 | |
55 | public function setBackendProtocol(string $backend_protocol) : void |
56 | { |
57 | $this->backendProtocol = $backend_protocol; |
58 | } |
59 | |
60 | public function getBackendPort() : int |
61 | { |
62 | return $this->backendPort; |
63 | } |
64 | |
65 | public function setBackendPort(int $backend_port) : void |
66 | { |
67 | $this->backendPort = $backend_port; |
68 | } |
69 | |
70 | public function getResponseName() : string |
71 | { |
72 | return 'forwarding_rule'; |
73 | } |
74 | |
75 | public function getModelExceptionClass() : string |
76 | { |
77 | return str_replace('ForwardRuleException', 'LoadBalancerException', parent::getModelExceptionClass()); |
78 | } |
79 | } |