Total Complexity | 6 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 0 |
1 | <?php |
||
7 | class PolymorphicRdata implements RdataInterface |
||
8 | { |
||
9 | /** |
||
10 | * The RData type. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | private $type; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $data; |
||
20 | |||
21 | /** |
||
22 | * PolymorphicRdata constructor. |
||
23 | * |
||
24 | * @param string|null $type |
||
25 | * @param string|null $data |
||
26 | */ |
||
27 | 1 | public function __construct(string $type = null, string $data = null) |
|
28 | { |
||
29 | 1 | $this->type = $type; |
|
30 | 1 | $this->data = $data; |
|
31 | 1 | } |
|
32 | |||
33 | /** |
||
34 | * @param string $type |
||
35 | */ |
||
36 | public function setType(string $type): void |
||
37 | { |
||
38 | $this->type = $type; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | 1 | public function getType(): string |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param string $data |
||
51 | */ |
||
52 | public function setData(string $data): void |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getData(): string |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | 1 | public function output(): string |
|
73 |