Total Complexity | 8 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
10 | final class ClientId |
||
11 | { |
||
12 | /** |
||
13 | * This field indicates the name of the clientId that we'll pass on to the broker. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | private $clientId; |
||
18 | |||
19 | /** |
||
20 | * QoSLevel constructor. |
||
21 | * |
||
22 | * @param int $packetIdentifier |
||
23 | * @throws \OutOfRangeException |
||
24 | */ |
||
25 | public function __construct(string $clientId) |
||
26 | { |
||
27 | $this->clientId = $clientId; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Gets the current clientId |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getClientId(): string |
||
36 | { |
||
37 | return $this->clientId; |
||
38 | } |
||
39 | |||
40 | public function __toString(): string |
||
41 | { |
||
42 | return $this->getClientId(); |
||
43 | } |
||
44 | |||
45 | public function isEmptyClientId(): bool |
||
46 | { |
||
47 | return $this->clientId === ''; |
||
48 | } |
||
49 | |||
50 | public function performStrictValidationCheck(): string |
||
69 | } |
||
70 | } |
||
71 |