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

PingResp   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A performSpecialActions() 0 5 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 PingResp extends ProtocolBase implements ReadableContentInterface
14
{
15
    use ReadableContent;
16
17
    const CONTROL_PACKET_VALUE = 13;
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function performSpecialActions(Client $client, WritableContentInterface $originalRequest): bool
23
    {
24
        $this->logger->debug('Updating internal last communication', ['object' => \get_class($this)]);
25
        $client->updateLastCommunication();
26
        return true;
27
    }
28
}
29