| Total Complexity | 8 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class SRVData extends DataAbstract implements \Stringable |
||
| 9 | { |
||
| 10 | public function __construct(private int $priority, private int $weight, private int $port, private Hostname $target) |
||
| 11 | { |
||
| 12 | } |
||
| 13 | |||
| 14 | public function __toString(): string |
||
| 15 | { |
||
| 16 | return "{$this->priority} {$this->weight} {$this->port} {$this->target}"; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getPriority(): int |
||
| 20 | { |
||
| 21 | return $this->priority; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getWeight(): int |
||
| 25 | { |
||
| 26 | return $this->weight; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getPort(): int |
||
| 30 | { |
||
| 31 | return $this->port; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getTarget(): Hostname |
||
| 37 | } |
||
| 38 | |||
| 39 | public function toArray(): array |
||
| 40 | { |
||
| 46 | ]; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function __unserialize(array $unserialized): void |
||
| 55 | } |
||
| 56 | } |
||
| 57 |