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

SubAck::fillObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
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