| Total Complexity | 5 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class NetworkAddress extends Serializable implements NetworkAddressInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | private $services; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var IpInterface |
||
| 21 | */ |
||
| 22 | private $ip; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var int |
||
| 26 | */ |
||
| 27 | private $port; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param int $services |
||
| 31 | * @param IpInterface $ip |
||
| 32 | 83 | * @param int $port |
|
| 33 | */ |
||
| 34 | 83 | public function __construct(int $services, IpInterface $ip, int $port) |
|
| 35 | 83 | { |
|
| 36 | 83 | $this->services = $services; |
|
| 37 | 83 | $this->ip = $ip; |
|
| 38 | $this->port = $port; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | 42 | * @return int |
|
| 43 | */ |
||
| 44 | 42 | public function getServices(): int |
|
| 45 | { |
||
| 46 | return $this->services; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | 42 | * @return IpInterface |
|
| 51 | */ |
||
| 52 | 42 | public function getIp(): IpInterface |
|
| 53 | { |
||
| 54 | return $this->ip; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | 42 | * @return int |
|
| 59 | */ |
||
| 60 | 42 | public function getPort(): int |
|
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | 27 | * @return BufferInterface |
|
| 67 | */ |
||
| 68 | 27 | public function getBuffer(): BufferInterface |
|
| 71 | } |
||
| 72 | } |
||
| 73 |