Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | final class ProtocolVersion |
||
13 | { |
||
14 | /** |
||
15 | * Holds the current protocol version |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | private $protocolVersion; |
||
20 | |||
21 | /** |
||
22 | * QoSLevel constructor. |
||
23 | * |
||
24 | * @param string $protocolVersion |
||
25 | * @throws \unreal4u\MQTT\Exceptions\Connect\UnacceptableProtocolVersion |
||
26 | */ |
||
27 | 5 | public function __construct(string $protocolVersion = '3.1.1') |
|
33 | 4 | } |
|
34 | |||
35 | /** |
||
36 | * Gets the current protocol version |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | 4 | public function getProtocolVersion(): string |
|
43 | } |
||
44 | |||
45 | 1 | public function __toString(): string |
|
50 |