Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | final class BrokerPort |
||
13 | { |
||
14 | /** |
||
15 | * This field indicates the level of assurance for delivery of an Application Message. Can be 0, 1 or 2 |
||
16 | * |
||
17 | * 0: At most once delivery (default) |
||
18 | * 1: At least once delivery |
||
19 | * 2: Exactly once delivery |
||
20 | * |
||
21 | * @var int |
||
22 | */ |
||
23 | private $brokerPort; |
||
24 | |||
25 | /** |
||
26 | * BrokerPort constructor. |
||
27 | * |
||
28 | * @param int $brokerPort |
||
29 | * @throws \unreal4u\MQTT\Exceptions\InvalidBrokerPort |
||
30 | */ |
||
31 | 25 | public function __construct(int $brokerPort = 1883) |
|
41 | 23 | } |
|
42 | |||
43 | /** |
||
44 | * Gets the current broker port |
||
45 | * |
||
46 | * @return int |
||
47 | */ |
||
48 | 6 | public function getBrokerPort(): int |
|
53 |