Total Complexity | 6 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
21 | final class Port implements ComponentInterface |
||
22 | { |
||
23 | private const MIN_VALUE = 1; |
||
24 | private const MAX_VALUE = (2 ** 16) - 1; |
||
25 | |||
26 | private ?int $value = null; |
||
27 | |||
28 | /** |
||
29 | * @param mixed $value |
||
30 | * |
||
31 | * @throws InvalidArgumentException |
||
32 | */ |
||
33 | 55 | public function __construct($value) |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | * |
||
53 | * @return int|null |
||
54 | */ |
||
55 | 47 | public function getValue(): ?int |
|
60 |