Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class Ip |
||
13 | { |
||
14 | protected int $type = Interfaces\IIpTypes::TYPE_NONE; |
||
15 | /** @var array<int, string> */ |
||
16 | protected array $address = []; |
||
17 | protected int $affectedBits = 0; |
||
18 | |||
19 | /** |
||
20 | * @param int $type |
||
21 | * @param array<int, string> $address |
||
22 | * @param int $affectedBits |
||
23 | * @return $this |
||
24 | */ |
||
25 | 26 | public function setData(int $type, array $address, int $affectedBits = 0): self |
|
26 | { |
||
27 | 26 | $this->type = $type; |
|
28 | 26 | $this->address = $address; |
|
29 | 26 | $this->affectedBits = $affectedBits; |
|
30 | 26 | return $this; |
|
31 | } |
||
32 | |||
33 | 1 | public function getType(): int |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return array<int, string> |
||
40 | */ |
||
41 | 23 | public function getAddress(): array |
|
44 | } |
||
45 | |||
46 | 23 | public function getAffectedBits(): int |
|
49 | } |
||
50 | } |
||
51 |