| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | final class Service |
||
| 10 | { |
||
| 11 | private $typeId; |
||
| 12 | private $port; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param int $typeId |
||
| 16 | * @param int $port |
||
| 17 | * @throws InvalidValueException |
||
| 18 | */ |
||
| 19 | 11 | public function __construct(int $typeId, int $port) |
|
| 20 | { |
||
| 21 | 11 | $this->typeId = validate_uint8('Service type ID', $typeId); |
|
| 22 | 9 | $this->port = validate_uint32('Port', $port); |
|
| 23 | } |
||
| 24 | |||
| 25 | 1 | public function getTypeId(): int |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | public function getPort(): int |
|
| 31 | { |
||
| 32 | 1 | return $this->port; |
|
| 33 | } |
||
| 34 | |||
| 35 | 2 | public function getName(): string |
|
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |