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

PingResp::fillObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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