Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | final class DisconnectCleanup extends ProtocolBase implements ReadableContentInterface |
||
11 | { |
||
12 | 1 | use ReadableContent; |
|
13 | |||
14 | private const CONTROL_PACKET_VALUE = 0; |
||
15 | |||
16 | /** |
||
17 | * @inheritdoc |
||
18 | */ |
||
19 | 1 | public function performSpecialActions(ClientInterface $client, WritableContentInterface $originalRequest): bool |
|
20 | { |
||
21 | 1 | $successFullyClosed = $client->shutdownConnection(); |
|
22 | 1 | $this->logger->info('Sent shutdown signal to socket', ['successFullyClosed' => $successFullyClosed]); |
|
23 | 1 | $client->setConnected(false); |
|
24 | 1 | return true; |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * @inheritdoc |
||
29 | */ |
||
30 | 1 | public function getOriginControlPacket(): int |
|
33 | } |
||
34 | |||
35 | 1 | public function fillObject(string $rawMQTTHeaders, ClientInterface $client): ReadableContentInterface |
|
38 | } |
||
39 | } |
||
40 |