Total Complexity | 8 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | class CAAData extends DataAbstract |
||
5 | { |
||
6 | /** |
||
7 | * @var int |
||
8 | */ |
||
9 | private $flags; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $tag; |
||
15 | |||
16 | /** |
||
17 | * @var string|null |
||
18 | */ |
||
19 | private $value; |
||
20 | |||
21 | public function __construct(int $flags, string $tag, string $value = null) |
||
26 | } |
||
27 | |||
28 | public function __toString(): string |
||
29 | { |
||
30 | return "{$this->flags} {$this->tag} {$this->value}"; |
||
31 | } |
||
32 | |||
33 | public function getFlags(): int |
||
34 | { |
||
35 | return $this->flags; |
||
36 | } |
||
37 | |||
38 | public function getTag(): string |
||
39 | { |
||
40 | return $this->tag; |
||
41 | } |
||
42 | |||
43 | public function getValue(): ?string |
||
46 | } |
||
47 | |||
48 | public function toArray(): array |
||
49 | { |
||
50 | return [ |
||
51 | 'flags' => $this->flags, |
||
52 | 'tag' => $this->tag, |
||
53 | 'value' => $this->value, |
||
54 | ]; |
||
55 | } |
||
56 | |||
57 | public function serialize(): string |
||
58 | { |
||
59 | return \serialize($this->toArray()); |
||
60 | } |
||
61 | |||
62 | public function unserialize($serialized): void |
||
68 | } |
||
69 | } |
||
70 |