Total Complexity | 5 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | class Port |
||
24 | { |
||
25 | /** @var int */ |
||
26 | private $port; |
||
27 | |||
28 | public function __construct(int $port) |
||
29 | { |
||
30 | $this->ensureIsValidPort($port); |
||
31 | $this->port = $port; |
||
32 | } |
||
33 | |||
34 | public function asInt(): int |
||
37 | } |
||
38 | |||
39 | /** @throws InvalidArgumentException */ |
||
40 | private function ensureIsValidPort(int $port): void |
||
47 |