Total Complexity | 6 |
Total Lines | 75 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | abstract class GenericServerType implements ServerTypeInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var string the domain or ip to connect to Votifier |
||
19 | */ |
||
20 | private $host; |
||
21 | |||
22 | /** |
||
23 | * @var int the port which votifier uses on the server |
||
24 | */ |
||
25 | private $port = 8192; |
||
26 | |||
27 | /** |
||
28 | * @var string The public.key which is generated by the plugin. |
||
29 | */ |
||
30 | private $publicKey; |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function getHost(): string |
||
36 | { |
||
37 | return $this->host; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function setHost(string $host): self |
||
44 | { |
||
45 | $this->host = $host; |
||
46 | |||
47 | return $this; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function getPort(): int |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function setPort(int $port) |
||
62 | { |
||
63 | $this->port = $port; |
||
64 | |||
65 | return $this; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getPublicKey(): string |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function setPublicKey(string $publicKey): self |
||
90 | } |
||
91 | } |
||
92 |