TXTData::__unserialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace RemotelyLiving\PHPDNS\Entities;
4
5
final class TXTData extends DataAbstract implements \Stringable
6
{
7
    public function __construct(private string $value)
8
    {
9
    }
10
11
    public function __toString(): string
12
    {
13
        return $this->value;
14
    }
15
16
    public function getValue(): string
17
    {
18
        return $this->value;
19
    }
20
21
    public function toArray(): array
22
    {
23
        return [
24
            'value' => $this->value,
25
        ];
26
    }
27
28
    public function __unserialize(array $unserialized): void
29
    {
30
        $this->value = $unserialized['value'];
31
    }
32
}
33