Total Complexity | 6 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | final class PTRData extends DataAbstract |
||
9 | { |
||
10 | private Hostname $hostname; |
||
11 | |||
12 | public function __construct(Hostname $hostname) |
||
13 | { |
||
14 | $this->hostname = $hostname; |
||
15 | } |
||
16 | |||
17 | public function __toString(): string |
||
20 | } |
||
21 | |||
22 | public function getHostname(): Hostname |
||
23 | { |
||
24 | return $this->hostname; |
||
25 | } |
||
26 | |||
27 | public function toArray(): array |
||
28 | { |
||
29 | return [ |
||
30 | 'hostname' => (string)$this->hostname, |
||
31 | ]; |
||
32 | } |
||
33 | |||
34 | public function serialize(): string |
||
35 | { |
||
36 | return serialize($this->toArray()); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param string $serialized |
||
41 | */ |
||
42 | public function unserialize($serialized): void |
||
46 | } |
||
47 | } |