Passed
Push — master ( c1f248...257530 )
by Camilo
01:51
created

SubAck   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 16
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A performSpecialActions() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace unreal4u\MQTT\Protocol;
6
7
use unreal4u\MQTT\Client;
8
use unreal4u\MQTT\Internals\ProtocolBase;
9
use unreal4u\MQTT\Internals\ReadableContent;
10
use unreal4u\MQTT\Internals\ReadableContentInterface;
11
use unreal4u\MQTT\Internals\WritableContentInterface;
12
13
final class SubAck extends ProtocolBase implements ReadableContentInterface
14
{
15
    use ReadableContent;
16
17
    const CONTROL_PACKET_VALUE = 9;
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function performSpecialActions(Client $client, WritableContentInterface $originalRequest): bool
23
    {
24
        $client
25
            ->updateLastCommunication()
26
            ->setBlocking(false)
27
        ;
28
        return true;
29
    }
30
}
31