| 1 | <?php |
||
| 22 | trait IntegerPortTrait { |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Port. |
||
| 26 | * |
||
| 27 | * @var int|null |
||
| 28 | */ |
||
| 29 | protected $port; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Get the port. |
||
| 33 | * |
||
| 34 | * @return int|null Returns the port. |
||
| 35 | */ |
||
| 36 | public function getPort(): ?int { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Set the port. |
||
| 42 | * |
||
| 43 | * @param int|null $port The port. |
||
| 44 | * @return self Returns this instance. |
||
| 45 | * @throws InvalidArgumentException Throws an invalid argument exception if the port is not between 1 and 65536. |
||
| 46 | */ |
||
| 47 | public function setPort(?int $port): self { |
||
| 54 | } |
||
| 55 |